i am trying to submit a form in jquery without refreshing it.
for my jquery code i have this:
$(function() {
$(".submitbuttonsend").click(function() {
var dataString = 'reqtoid=<?php echo $uid; ?>&reqfromid=<?php echo $id; ?>';
$.ajax({
type: "POST",
url: "proccess.php",
data: dataString,
success: function() {
$('#freekk').html("<div id='message' style='color: #4f4f4f; font-size: 12px; display: inline;'></div>");
.fadeIn(1500, function() {
$('#message').append("ClassMate request sent!");
});
}
});
return false;
});
});
and for my html i have:
<table cellspacing=0 cellpadding=0 class=center style='text-align: center;'><tr><td style='text-align: center;'><div style='display: inline; margin-left: auto; margin-right: auto; text-align: center;' id='freekk'><input type=submit value='Add ClassMate' class='nrbutton submitbuttonsend' style='width: 150px;'></div></td></tr></table>
but when i click the button, nothing happens. can anybody help me?