[Answer]-Default html action called instead of jquery while clicking a form button

1👍

write :

e.preventDefault();
e.stopPropagation(); 

instead of

e.preventDefault();

And

write

$.post("/saveFeedback2/",{ feedbackStatus:"Like", feedbackNoteID : "12345" });

instead of

$.post("/saveFeedback2/",{ feedbackStatus:"Like", feedbackNoteID = "12345" });

0👍

Use

$(document).ready(function() {
     $("#saveuserFeedback").submit( ...

instead and it should works

👤trollr

0👍

Use both e.preventDefault(); and e.stopPropagation();.

Also make sure you close the form </form>

Leave a comment