/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> $(document).ready(function(){ $("form#formId").submit(function() { inputField = $('#inputFieldId').attr('value'); $.ajax({ type: "POST", url: "yourpage.php", cache: false, data: "inputField ="+ inputField, success: function(html){ $("#ajax-results").html(html); } }); return false; }); }); </script>