Home › Forums › JavaScript › Submitting Values Without Refresh › Reply To: Submitting Values Without Refresh
December 19, 2013 at 4:15 am
#158722
Participant
Make sure the quotes you use in JavaScript are straight quotes ('
or "
), it looks like yours are not though it could be copy pasting here that messes things up.
You’re using a different selector for the form for the submit event handler and the serialize function. I think you can use $(this).serialize()
to make sure you serialize the right data.
Also take a look at jQuery’s $.post
function. Though not needed, it’s a nice ajax wrapper for POST requests.