Results 1 to 3 of 3

Thread: window.open - input args

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    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

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    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
  •  



Click Here to Expand Forum to Full Width