Page 1 of 1

submit to pop up on validation

Posted: Fri Jan 25, 2008 1:46 pm
by kendall
Hi,

can i validate a form and sumbit it upon succesful validation to a pop up window in javascript?

can i get an example? i have the code already but im not sure which comes first...or do i have to "merge" it into 1...

Re: submit to pop up on validation

Posted: Fri Jan 25, 2008 3:55 pm
by pickle
I've never tried this, but I imagine you could if you did things in this order:
  • On click of the submit button, validate the form. The click is fired before the submit, which is important.
  • If the form is valid, create a pop up window.
  • Change the "target" attribute of the form to the name of newly created window.
  • The form submit should then fire & submit the form to the popped up window.

Re: submit to pop up on validation

Posted: Fri Jan 25, 2008 4:50 pm
by Kieran Huggins
I'm generally allergic to popups, they're problematic at best.

Are you sure about this design?