javascript - submitting form with jQuery/AJAX, cant stop page from refreshing on submit? -
I'm having trouble having my AJAX
form POST
My PHP script without refreshing the page.
I've added both e.preventDefault ()
before and after the AJAX request, but it seems that no one is affected, which seems weird.
Here is my javascript:
// Submit ajax form $ ("form [name = signout request form]"). ("", "Echo", ("", "function" (e) {var cval = confirm.val (). ToLowerCase (). Substitution ("", ""); if (kawl! == "yes") Acceptance policy. ") Else} var formData = {validForm: true, name_txt: name.val (), productName_sel: prodName.val (), signoutDateStart_txt: startDate.val (), signoutDateEnd_txt: returnDate.val ( ), Additional notes_tactria: addNotes.val (), disclaimer_tyte: confirm.val (), recaptcha_challenge_field: recap_challenge.v al (), recaptcha_progress_field: recap_response.val (), studentUsername: studentUse.val ()} $ .exx ({ Type: "Post", ULL: Conf Lockation, Data : FormData, done: Function (Data) {$ (". SignoutEfterForm"). Remove (); $ ("Sign-Out-Form-Container") Html (Data);}})}} E.preventDefault ( );});
Right now, when I press submit, the page only appears to refresh without actually submitted form
< Div class = "post-text" itemprop = "text">
From the comments, it was determined that the call .on ()
one exception ( TypeError: no undefined function Is
) and you are using jQuery v1.5.2.
Version 1.7 was not added for older versions, .bind ()
should be used instead.
Comments
Post a Comment