|
I am having problems getting a popup to open from an onSubmit function when the form is being submitted from another frame.
Basically, I have two frames. In one frame I have a form and a JavaScript function, and the other frame contains a submit button (unfortunately this layout, albeit unorthodox, is essential).
FRAME ONE: <script language="JavaScript"> <!-- function openPopup() { window.open('index.htm'); return false; } //--> </script>
<body> <form name="myform" method="post" onsubmit="return openPopup();"> … </form> </body>
FRAME TWO: <script language="JavaScript"> <!-- function submitTheForm() { parent.right.myform.submit(); } //--> </script>
<body> <a href="#" onClick="submitTheForm();"><img src=”myimage.gif”></a> </body>
The button in frame two successfully submits the form BUT the openPopup function does not run. Is this a known problem?
Any ideas how to fix?
I also need to pass the input values from the form elements to the new window.
This post has been edited by philiprakusen: 14 Feb, 2005 - 04:58 AM
|