[eluser]krislec[/eluser]
Hello everyone
I need help with a problem I can not solve:
Why the '+' are they deleted from my input and my textarea if I use AJAX?
(They are preserved if I do not use AJAX)
Code:
[removed]
// Auto save
$(function(){
autosave();
});
function autosave() {
var t = setTimeout('autosave()', 50000);
var motif = $('#Motif').val();
var pci = $('#Pci').val();
var idcons = "<?php echo $idcons ?>";
if (motif.length > 0 || pci.length > 0)
{
$.ajax(
{
dataType: 'text',
type: 'POST',
url: '<?php echo site_url('consultation/autosave');?>/'+idcons,
data: 'idcons='+idcons+'&motif;='+motif+'&pci;='+pci,
cache: false,
success: function(message)
{
$('#timestamp').empty().append(message);
}
});
}
};
[removed]
Thanxs.