
November 16th, 2012, 12:54 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 23
Time spent in forums: 4 h 37 m 26 sec
Reputation Power: 0
|
|
|
Other - Pretty simple form question
I have a form that submits to a javascript function and the function opens a window. pretty simple and it works great except that it returns false in some browsers and actually replaces all the content of the parent window with the word "false" what am I doing wrong?
Here's my code:
Code:
<script language="javascript">
function bonus(){
//alert(document.bonus.code.value);
var feature = "/interactive/index.php?code=" + document.bonus.code.value;
window.open(feature,'1352258393691','width=700,height=500,toolbar=0,menubar=0,location=0,status=1,sc rollbars=0,resizable=1,left=0,top=0,srolling=no');
}
</script>
<div style="position: absolute; z-index: 100; left: 850px; top: 147px; border: 0px;">
<form name="bonus" action="javascript:bonus();">
<input type="text" name="code" size="25" style="border: 2px solid black; width: 160px; height 50px;" value="Type Your Bonus Code" onclick="this.value='';">
<input type="submit" value=" Go ">
</form>
I also tried it with onsubmit, same problem. Thanx
|