This works in FF and Chrome, but I can’t seem to stop the form from submitting in IE8.
JQuery is included in document ready function
$("#reserveAPickupAppointmentRoommate").click (function() {
roommate = $("#roommate").val();
$.post('roommateSearch.php', 'val=' + roommate, function (response) {
$("#roommateResults").html(response);
});
return false;
});
Relevant submit button in my form:
<input type="image"
src="images/arrow.png"
class="reserveAPickupAppointmentRoommate"
id="reserveAPickupAppointmentRoommate">
Try handling your form’s
submitevent, rather than the submit button’sclickhandler: