submit to pop up on validation

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

submit to pop up on validation

Post 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...
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: submit to pop up on validation

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: submit to pop up on validation

Post by Kieran Huggins »

I'm generally allergic to popups, they're problematic at best.

Are you sure about this design?
Post Reply