Hithere: I have a form that has to be submitted using javascript. The out put of the form submission should open in a popup window. But the parent window should not navigate. I was using a simple javascript popup code like this. <a href=“#†onClick="window.open('xxx.php','Window','height=500,width=650,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes'); javascript:document.form.submit();">YYY</a> This code opens the popup window nicely and the output of form submission is presented in the popup window. However, the problem with this code is that it also navigates the parent window and the form output is presented in both parent and popup window. To overcome this I used the following code. <a href="javascript:history.go(0)" onClick="window.open('xxx.php','Window','height=500,width=650,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes'); javascript:document.form.submit();">YYY</a> In this case the navigation of parent window is arrested to the history(0). However, in this case the parent window refreshes. I would appreciate if anyone can suggest a code in which the parent window is not affected. Thanks.
The above suggestion works great. But i am using an hyperlink and the form values are hidden. Is it possible to replace the button in the above case with a hyperlink? Any help is appreciated.
Replace <input type=submit value=Submit> Code (markup): with <a href="javascript:document.forms['main'].submit();">Submit</a> Code (markup):