jQuery code to not reload the page:
$(document).ready(function(){
$('#submit').click(function(){
var page = $(this).attr('id');
$('#content').load('content/submit.php');
});
});
Form submit
<input class="submit" id="submit" name="submit" type="submit" value="Submit">
submit.php
:
<div id="content">
<h2 style="color:#FF0000;"> Thanks For the Submission </h2>
</div>
I don't know still its loading the page after clicking the submit button
This will help get you started a bit.
You need to prevent the normal form submit by preventing the default event on your button. Otherwise the page will reload due to form submitting.
You also need to send data to server. You can get all the form data using
serialize()