Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts

    alert confirm within validation

    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?

  • #2
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    Code:
    var ok = confirm("Would you like to add an email?");
    if(ok)
    return false;
    else
    form.submit();

  • #3
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts
    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

  • #4
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    It is a yes no question (kinda). It is Ok Cancel question.. Pretty much the same.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •