Click to See Complete Forum and Search --> : Escape character in javascript?


chadorbaf
03-12-2003, 01:18 PM
Hi,
I just want to pass a parameter value with # as parameter
string to a jsp page as follow:
window.open("mypafe.jsp?a=wo#",......)

But on the page i could not receive the number sign (#). So probably like other languages in need to use escape char
for this. I trired like following with no success:
window.open("mypafe.jsp?a=wo\#",......)

Could please help me on this.Thanks.

gil davis
03-12-2003, 02:34 PM
Try %23

Dan Drillich
03-12-2003, 02:39 PM
Please try -


<SCRIPT>

var m = "xx###x";
var m2 = escape(m);

alert(m2);
</SCRIPT>

chadorbaf
03-13-2003, 09:49 AM
Thanks Gil and Dan, both of them work.