page refresh

Microsoft Microsoft windows xp pro full...
May 19, 2010 at 13:16:36
Specs: Windows XP, 2.4 3GB
I can't believe that I can't find an answer to this online.. but I can't. Can anyone help?

I have a form (form.php) which calls and executes code in post.php to place form data in mysql. The form is a popup ajax form and after I submit the form, I want the index.php page (where the link to my form resides) to refresh.

The form is submitting data to mysql which then appears on my index.php, but currently I have to refresh index.php to see it.

Any ideas? Thanks.

See More: page refresh

Report •

May 20, 2010 at 00:31:24
Uhm...javascript refresh?

Or's an AJAX update? Why not update the box...with ajax??

To use a javascript refresh, after the submit, add:
window.location = index.php;

Or with AJAX...I'd recommend jQuery usage. This would submit the form w/ Ajax & then post the result into the id="result" element.

$('form').submit(function() {
$.post('form.php', $(this).serialize(), function(data, txt) {
}, 'html');
return false;

Report •
Related Solutions

Ask Question