V
vunet.us
I have a function to open new window:
function bla(){ newwin = window.open("page.asp?file=1&id=<%=ID
%>","Image","other params") }
This function works fine mostly, but sometimes, there is a JavaScript
error: "Unterminated string literal". This happens only in one case.
If you noticed ASP variable <%=ID%>, then here's what happens to it.
ID gets url parameter "id" and inserts in that JavaScript. Obviously,
this URL comes from another page. And when it comes from the page with
someurl.asp?id=123%0%DA, then my JavaScript throws this error.
If previous page URL is just someurl.asp?id=123, then JS works
perfect. Where is the catch?
Thank you.
function bla(){ newwin = window.open("page.asp?file=1&id=<%=ID
%>","Image","other params") }
This function works fine mostly, but sometimes, there is a JavaScript
error: "Unterminated string literal". This happens only in one case.
If you noticed ASP variable <%=ID%>, then here's what happens to it.
ID gets url parameter "id" and inserts in that JavaScript. Obviously,
this URL comes from another page. And when it comes from the page with
someurl.asp?id=123%0%DA, then my JavaScript throws this error.
If previous page URL is just someurl.asp?id=123, then JS works
perfect. Where is the catch?
Thank you.