I am using POST method in Ajax. I have to send a number of items through POST.
So I am creating a variable like this :
[CODE=javascript]
params += "name="+documen t.getElementByI d(name').value+ "&";
params +="email="+docu ment.getElement ById('email').v alue+"&";
params +="message="+do cument.getEleme ntById('message ').value+"&";
----------
-----------
http.open("POST ", url, true);
------------------
------------------
http.send(param s);
[/CODE]
This code is working correclty. But some times name and message field's data contains '&' symbols. Then this cause problem with '&' in the parameter. The data is getting cutoff at this places. What is the solution for this problem?
Thanks in advance..
AMT India
So I am creating a variable like this :
[CODE=javascript]
params += "name="+documen t.getElementByI d(name').value+ "&";
params +="email="+docu ment.getElement ById('email').v alue+"&";
params +="message="+do cument.getEleme ntById('message ').value+"&";
----------
-----------
http.open("POST ", url, true);
------------------
------------------
http.send(param s);
[/CODE]
This code is working correclty. But some times name and message field's data contains '&' symbols. Then this cause problem with '&' in the parameter. The data is getting cutoff at this places. What is the solution for this problem?
Thanks in advance..
AMT India
Comment