|
-
Jan 30th, 2003, 03:14 PM
#1
Thread Starter
Lively Member
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.
-
Jan 30th, 2003, 08:09 PM
#2
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|