
October 13th, 2007, 04:58 PM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 1
Time spent in forums: 8 m
Reputation Power: 0
|
|
Passing variable to URL in popup windos using javascript
Hello There:
I was wanted to pass the variable to url so it can open in new windows, the code below that i found from internet only can open in the same windows but not in new window:
----------------------------------------------------------
Code:
<script language="JavaScript" type="text/JavaScript">
function goP(f){
location.href='index.html'+'?'+f.elements['idnr'].value
}
</script>
<input type="button" value="GO" onclick="goP(this.form)">
----------------------------------------------------------
How to i change it so it can open in new window? I tried to use window.open instead of location.href but it just doesnt work, please please please help me 
|