call to web server through ajax
-
Hi all before sending request to web server using ajax i am creating a string with form element's name and corresponding value.the constructed string will looks like source.asp?elementName1=elementValue1&elementName2=elementValue2&elementName3=elementValue3 the problem with the above format is: if the elementValue itself contains any "&" symbol i can't able to get the value of the form element from server side. is there any way to resolve this issue other than replace the "&" char with some other char ..
N.Rajakumar B.E., Application Developer, www.newdreamz.tk
-
Hi all before sending request to web server using ajax i am creating a string with form element's name and corresponding value.the constructed string will looks like source.asp?elementName1=elementValue1&elementName2=elementValue2&elementName3=elementValue3 the problem with the above format is: if the elementValue itself contains any "&" symbol i can't able to get the value of the form element from server side. is there any way to resolve this issue other than replace the "&" char with some other char ..
N.Rajakumar B.E., Application Developer, www.newdreamz.tk
-
var location = " source.asp?elementName1=" + encodeURI(elementValue1) + "&elementName2=" + encodeURI(elementValue2) + "&elementName3=" + encodeURI(elementValue3);
Brad Australian "Keyboard? Ha! I throw magnets over the RAM chips!" - peterchen
Did you mean encodeURIComponent()?
I'm on-line therefore I am. JimmyRopes
-
Did you mean encodeURIComponent()?
I'm on-line therefore I am. JimmyRopes
encodeURIComponent is working fine on all reserved chars where as encodeURI is limited...
N.Rajakumar B.E., Application Developer, www.newdreamz.tk