Hi. I'm trying to make a script which submits the form without refreshing the page. Also, I'd like to have it submit onkeyup.
I can't figure out how to do that.
Can anyone help me?
My code is
<script type="text/javascript">
$(document).ready(function(){
var $form = $( '#myform' ),
url = $form.attr( 'action' );
$("#myform").validate({
submitHandler: function(form) {
var rData = $("#myform").serialize();
$.post(url, rData, function(data) {
$('#results').html(data);
});
}
});
});
</script>
Thanks