Results 1 to 2 of 2

Thread: Javascript passing querystring...[FIXED]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    The Netherlands
    Posts
    96

    Javascript passing querystring...[FIXED]

    I'm trying to pass a Querystring from a listbox into a new opened window...

    Code:
    <script language="JavaScript">
    
    function MM_openBrWindow(theURL,winName,features) { //v2.0
    theBla = "document.php?id=" + theURL;
      window.open(theBla,winName,features);
    }
    
    </script>
    </head>
    
    <body>
    
    <form name="form1" method="post" action="">
      <select name="select"">
        <option value="5" selected>Test5</option>
        <option value="67">Test67</option>
        <option value="987">Test987</option>
      </select>
    </form>
    
    <a href="#" onClick="MM_openBrWindow(form1.select.value,'','')">Link</a>
    I try to get it to link to document.php?id= option value...

    Somehow when trying to pass this string...I only get
    document.php
    back to my browser....pretty strange..anyone an idea?

    When I set
    Code:
    theBla = "document.php" + theURL;
    I do get some values like document.php67, document.php987

    FIXED: How could I be so stupid...when removing the spaces between in the creatoin of theBla it suddenly worked..
    theBla = "document.php?id="+theURL;
    Last edited by Chrissie; Jan 30th, 2003 at 03:24 PM.

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655
    It should have worked just as well with the spaces.
    www.RealisticGraphics.net

    Running VS.Net Enterprise & VB 6

    Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML

    MSN Messenger: kmsheff

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