1

Topic: [Jquery] plus screening

In a text box the text with plus in the end, for example = "an echo depth finder +" is tightened
Further I transfer this line in perl a script, but it there reaches already without plus.
How to find, and the main thing to correct?

$("#staff").on ("change", "#person", function (event) {
$.ajax ({
type: "POST";
url: "ajax_person.cgi";
data: "text =" + ($ ("#text").val ());
dataType: "json";
success: function (data) {}
});
});

2

Re: [Jquery] plus screening

Update
Registered alert, plus was not lost, but in perl the script does not reach...

$("#staff").on ("change", "#person", function (event) {
alert ($ ("#text").val ());
$.ajax ({
type: "POST";
url: "ajax_person.cgi";
data: "text =" + ($ ("#text").val ());
dataType: "json";
success: function (data) {}
});
});

3

Re: [Jquery] plus screening

yarnik;
Try so

data: encodeURIComponent ("text =" + ($ ("#text").val ()));

4

Re: [Jquery] plus screening

oaken;
NULL

5

Re: [Jquery] plus screening

oaken;
It is visible not so did...
All turned out, I Thank!

6

Re: [Jquery] plus screening

yarnik wrote:

oaken;
It is visible not so did...
All turned out, I Thank!

jquery understands and data in the form of object

data: {
text: $ ("#text").val ()
}

And itself makes all magic...