where to insert email in a form validation script


hello helpful folk. have form validation script came template can't see insert email address direct form submission.

 

 

/*  *     contact form validation  *     script used contact form. */  $(document).ready(function(){         $('#contactform').submit(function() {                 // disable submit button           $('#contactform input[type=submit]')                .attr('value', 'sending message...')                .attr('disabled', 'disabled');                 // ajax post request           $.post(                $(this).attr('action'),                {                     name:$('#name').val(),                     email:$('#email').val(),                     message:$('#message').val()                },                function(errors) {                     // no errors                     if (errors == null) {                          $('#contactform')                               .hide()                               .html('<h3>thank you</h3><p>your message has been sent.</p>')                               .show();                     }                           // errors                     else {                          // re-enable submit button                          $('#contactform input[type=submit]')                               .removeattr('disabled')                               .attr('value', 'send');                                // technical server problem, email not sent                          if (errors.server != null) {                               alert(errors.server);                               return false;                          }                                // empty errorbox , reset error alerts                          $('#contactform .errorbox').html('<ul></ul>').show();                          $('#contactform input').removeclass('alert');                                // loop on errors, mark corresponding input fields,                          // , add error messages errorbox.                          (field in errors) {                               if (errors[field] != null) {                                    $('#contactform .errorbox ul').append('<li>' + errors[field] + '</li>');                               }                          }                     }                },                'json'           );                 // prevent non-ajax form submission           return false;      });  }); 



More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support