jacy_m
asked on
Window.location error
Hi, I get an Object doesnt support this method error when I run the following code (using asp to write the javascript). What is wrong with it?
Response.write("<SCRIPT>")
Response.write("window.loc ation.href ('InvoiceD etails.asp ?orderId=" & intOrder & "&err=" & strError & "');")
Response.write("</script>" )
Response.write("<SCRIPT>")
Response.write("window.loc
Response.write("</script>"
In javascript you would use the escape function like:
var url = "page.asp?orderid=" + escape("ab:995") + "&err=" + escape("This msg has spaces");
Perhaps you can the equivalent function in ASP.
:o)
Ant
var url = "page.asp?orderid=" + escape("ab:995") + "&err=" + escape("This msg has spaces");
Perhaps you can the equivalent function in ASP.
:o)
Ant
ASKER
what is escape mean? thanks
ASKER
thanks the code without the escape seemed to load the page ok but I get an Error on page message in the bottom bar. There shouldnt have been any spaces in the url that i generated. How do i see what the error is?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In the above comment, please note that the second line of code should be on one line and not two. Also, to answer your other question about how to view your javascript errors: In IE, double click on the message at the bottom that says "Errors on page". In Netscape, type "javascript:" in the address and press enter.
ASKER
thanks I have it working now
ASKER
I wil give the points to epeele as he provided the full solution, but i appreciate your comments a.marsh thanks again
Thanks jacy_m!
:o)
Ant
Ant
Response.write("window.loc
Now I don't really know ASP but you should also escape the two values aswell.
:o)
Ant