-
window.open - input args
hi all
i know that the folowing function opens default.asp in new window but i truly dont know wht are the folowing means:
window.open("default.asp?cat=" + menuname,"_self");
1. the "?" mark
2. ,"_self"
what the "+" usses to when it appeaars in the address line?
and how can i access for that number from other web page?
sorry for the many questions
and thanks again
-
Ok the window.open function opens a new window. Full details about this here - that covers the "_self" bit (the window name).
The ? is used to pass variable to the new page (in this case default.asp). If you design a html form and use the GET method to submit then all the values entered into the form are passed in the URL in much the same way.
The menuname bit is a javascript variable that must be set elsewhere in the page at runtime therefore when the line of code you posted is reached the javascript variable is concatonated onto the end of the URL. If say menuname had a value of "help" then the following line of code at runtime would be generated:
window.open("default.asp?cat=help","_self");
Hope that covers everything.
-
thanks thanks
that cover exactly what i needed too!!!
thanks allot