T O P I C R E V I E W |
novak |
Posted - 31 Oct 2007 : 08:21:38 Can you help me with form, when click submit. I would like creat form, when i click submit open new window, but when I insert before submit (onclick="myOpenWindow()) the script function Validator does not function.
<script language="JavaScript"><!-- buttonClicked=false; function myOpenWindow() { myWindowHandle = window.open('about:blank','myWindowName','resizable,status,scrollbars=yes,width=100,height=200,top=0,left=0'); } //--></script>
<form id="Rezervace_vozidla" name="Rezervace_vozidla" style="position: absolute; left: 9px; top: 365px;" action="Rezervace_vozidla_handler.php" method="get" target="myWindowName" onsubmit="if (!buttonClicked) ;">
<input type="submit" id="Odeslat" name="Odeslat" style="width: 85px; height: 19px;" class="button" onclick="myOpenWindow(); buttonClicked=true; setTimeout('document.myForm.submit()',500);return false;" value="ODESALT"></div>
|
1 L A T E S T R E P L I E S (Newest First) |
s.dav |
Posted - 31 Oct 2007 : 09:10:02 Maybe I didn't understood in a correct way your question but I suppose you want to submit the data to a new window right?
To do this, simply follow these instructions: 1- remove from your submit button the onclick event, this is not needed 2- change the onsubmit event of the form returning true or false, false to block the submit (the event code should like 'return checkFields();' and the checkFields is a function that returns true or false) 3- the form already has a target property so the data will be sent to a new window.
|
|
|