sorry, i wasn't logged in when i submitted my last response and i do not see it. so, again:
just put a "return false;" after you .ajax call. this will cancel the submit button's default behaviors. i have included my code below btw, i added a cache: false so that the form would not be cached for testing.
- $(document).ready(function() {
- $('#former').submit(function() {
- $.ajax({
- type: "POST",
- url: 'process.php',
- data: $(this).serialize(),
- dataType: "text/html",
- cache: false,
- success: function(html){ $("#green").html(html); }
- });
- return false;
- });
- });
hope this helps.