- URL as your form action
- TYPE as your form method
- DATA as your input parameters.
<script type="text/javascript" src="http://domain.url.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
function form_post() {
$.ajax({
url : 'http://domain.url.com/form.php',
type: 'post',
data: {'param1' : 'param1_value', 'param2' : 'param2_value'},
success: function(data){
alert(data);
},
error: function(data){
alert(data);
}
});
}
</script>
No comments:
Post a Comment