Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop-up Confirming Data on Form Submit

Status
Not open for further replies.

ciaw525

Technical User
Mar 3, 2008
2
On my website there is a form where users enter their e-mail address to subscribe to a newsletter.

Is there anyway that on form submit javascript could pop-up a window that says something like,

"You entered "myemail@server.com" is this correct?"

and they can either hit OK and submit the form, or cancel and have an opportunity to correct it?

Any help would be greatly appreciated.
 
The [tt]confirm[/tt] function is what you are after.

Returning the value of a call to [tt]confirm[/tt] in your form's [tt]onsubmit[/tt] handler will either stop the form submission if the user selects Cancel - in which case they can edit the field and try again - or allow the form to be submitted if they select OK.

[sub]Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
[/sub]

Webflo
 
Thank you! So simple and works perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top