|
-
Jul 21st, 2003, 04:30 PM
#1
Thread Starter
Addicted Member
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
-
Jul 22nd, 2003, 05:19 AM
#2
Frenzied Member
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.
-
Jul 22nd, 2003, 02:18 PM
#3
Thread Starter
Addicted Member
thanks thanks
that cover exactly what i needed too!!!
thanks allot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|