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
    gig
    gig is offline
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to clear alert message in sendmail ajax form

    hi,
    I used Bryan Helmig's sendmail php+ajax form.
    But after the user presses submit without filling a required field,
    he cannot clear the alert message.
    I would expect it to clear after clicking somewhere or escape, but it remains even after closing and opening the contact form again.
    How can I fix this?

    thanks a lot!

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    Sounds like a JavaScript issue. In any event there isn't much we can do if you don't post some code or a link to a page where we can reproduce the error.

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,454
    Thanks
    0
    Thanked 632 Times in 622 Posts
    How is the alert message being created - is it a lightbox script - if so which one - or is it simply the JavaScript debugging command - alert() - if the latter then if you run the code in Opera there will be an extra checkbox in the alert to allow you to turn off JavaScript for that web page. Other browsers will display a checkbox to kill all further alerts from the page when the second alert displays.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    gig
    gig is offline
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks, I solved it

    I added this in my document javascript:

    $('#contactForm input,#contactForm textarea').click(function() {
    $('.message').hide();
    });

    You can see it here: http://www.mayagonen.net/index_en.html


  •  

    Posting Permissions

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