Hi I have managed to get my form to submit without reloading, using this plugin: http://jquery.malsup.com/form/
And also with the regular .post() method however the browser always scrolls to the top. Is this normal?
$(document).ready(function()
{
// Temporary upload demo
if ($("#breadcrumbs:contains('AdrianTest')").length)
{
$('form.ltpo-form').ajaxForm();
$('form.ltpo-form').submit(function(event) {
event.preventDefault();
return false;
});
$('form.ltpo-form').submit(function() {
// submit the form
var options = {
data: { p_action: 'Save' },
success: function() {
alert('Success');
}
};
$(this).ajaxSubmit(options);
// return false to prevent normal browser submit and page navigation
event.preventDefault();
return false;
});
}
...
i had problems n was because i was using the ajaxSubmit and ajaxForm inside a wrap function like your