PDA

View Full Version : Sending data in AJAX call



adarshakb
Mar 23rd, 2011, 02:48 PM
Hi there

How to send data from a text feild in GET method using an AJAX call...
I already have codes working



to = "interfaces/add_department.jsp";
parm = "name="+name.value+
"&name2="+name2.value;
alert(parm)
post(to,parm,callBackFunctionForAddDepartment);

Here the variable name may have "me&you" or "me you" like that.... so how do i encode it so that it reaches properly?

harbingerOTV
Mar 23rd, 2011, 03:07 PM
You probably want to look at: http://www.w3schools.com/jsref/jsref_encodeuricomponent.asp