Note that there are some explanatory texts on larger screens.

plurals
  1. POJavaScript/ Php no response after email submit button
    primarykey
    data
    text
    <p>Please could you help me I have the below javascript code everything works fine email validating works fine but when a visitor types in there email address and click sign up button the confirmation message 'You will be notified with our latest events!' doesn't show up.</p> <pre><code> $(document).ready(function(){ //Bind JavaScript event on SignUp Button $('#submitbtn').click(function(){ signUp($('#email').val()); }); var signUp = function(inputEmail) { var isValid = true; var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; if(!emailReg.test(inputEmail)){ isValid = false; alert('Your email is not in valid format'); } if(isValid){ var params = { 'action' : 'SignUp', 'email' : inputEmail }; $.ajax({ type: "POST", url: "scripts/mail.php", data: params, success: function(response){ if(response){ var responseObj = jQuery.parseJSON(response); if(responseObj.ResponseData) { $('#submitbtn').val(''); showMessage('You will be notified with our latest events!'); } } } }); } }; var mousedownHappened = false; $("#submitbtn").mousedown(function() { mousedownHappened = true; }); $("#email").focus(function(){ $(this).animate({ opacity: 1.0, width: '250px' }, 300, function(){ // callback method empty }); // display submit button $("#submitbtn").fadeIn(300); }); $("#email").blur(function(){ if(mousedownHappened) { // reset mousedown and cancel fading effect mousedownHappened = false; } else { $("#email").animate({ opacity: 0.75, width: '250px' }, 500, function(){ // callback method empty }); // hide submit button $("#submitbtn").fadeOut(400); } }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload