...

View Full Version : alert confirm within validation



esthera
07-15-2007, 08:20 AM
i have validation that now validates that an email exists


if (email == "") {
Message = "Please Enter a Valid Shipping Email Address\r\n"



I want to change this that if the email is blank -- it gives them a yes/no javascript box -- saying we highly recommend you put in an email. Would you like to add an email yes/no - if they choose yes it returns false and takes them to the email field - otherwise it returns true and lets them submit the form

can someone help me with this?

BarrMan
07-15-2007, 10:49 AM
var ok = confirm("Would you like to add an email?");
if(ok)
return false;
else
form.submit();

esthera
07-15-2007, 10:51 AM
how can i make it a yes no option

i want to give them a choice to either just submit the form or to go back and put in an email

BarrMan
07-15-2007, 10:52 AM
It is a yes no question (kinda). It is Ok Cancel question.. Pretty much the same.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum