By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,619 Members | 1,534 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,619 IT Pros & Developers. It's quick & easy.

submit a form in a popup

P: 42
Ok,
I hope I can get some help here,

Basically what I want to do, is to have my form to be submitted to a popup,
no problem there,
the problem is,

I want to initiate this from a button that is pressed on Another form, but no matter what I get it to open on another page not the popup.

something like :

Expand|Select|Wrap|Line Numbers
  1.  
  2. function popup(){
  3. window.open("", "newwin", "width=750,height=600,scrollbars=yes,resizable=yes");
  4. document.2ndform.submit();
  5. }
  6.  
  7. <from name="1stform">
  8. <input value ="button" type="button" onclick="popup()">
  9. </form>
  10.  
  11. <form name="2ndform" method="POST" action="xxx" target="newwin"  onsubmit="window.open("", "newwin", "width=750,height=600,scrollbars=yes,resizable=yes")">
  12. </form>
  13.  
when I use the "document.2ndform.submit();", the "onsubmit" of the 2nd form is skipped, and even if I open the popup in the function before submitting, the form is not targeted to that pop up, instead a new page opens.
Jan 5 '08 #1
Share this Question
Share on Google+
1 Reply


P: 42
Problem Solved.
thankx.
Jan 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.