Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What does this mean in a Javascript?

    Someone wrote some code for me that contains the following statement, and I'd like to know what it means. The statement (contained in the HEAD section, sandwiched between <script> and </script>, is:

    function yourfunctn(s) {
    window.open("?xz="+s,"data","resizeable=yes[etc etc--other variables for the window to be popped-up]");
    }

    This statement is contained within some HTML code that is written to a window. xz is the name of a variable that the PHP script contains. xz clearly is the name of a file that's written in the window.

    What I want to know is, what is the meaning of the ?, the =, and the +s in the statement above.

    Tnx in advance.

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Look at the url to this thread:

    http&#58;//www.codingforums.com/showthread.php?t=39864

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a ? mark is used to seperate the url on the rigth side of it from the data on the left. basicly the idea is to pass data from page a to page be by writing in the link on page a: b?name=value.
    then on page be you would have access to a variabel called name with the value as its value in a server side language, and in javascript using a user made script.

  • #4
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What Gardon said is pretty much correct. This is referred to as a query string.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •