Click to See Complete Forum and Search --> : redirect to new page after submitting a form.


drahul
09-27-2005, 02:16 AM
Hi,

I need the form submission to redirect to a new page without loading the current page.

For Ex: On sumbitting some data, it must open a page saying THANK YOU !

I have done a work-around as : after getting submitted, when the page opens up, checks whether it was form submission (to avoid redirecting on normal page load), and sets the document URL to the new page.

But this causes irritation due to slight snag between the form submission and redirection, especially when the page takes some time to load.

How can I simply solve this problem. Is there any property in the form tag that redirects page automatically. The "target" field does this, but opens a new page. How can i solve this issue ?


advance thax.
rahul

David Harrison
09-27-2005, 03:38 AM
What's wrong with this?:<form method="post" action="page2.php">

drahul
09-27-2005, 11:55 PM
What's wrong with this?:<form method="post" action="page2.php">
Now that requires the processing to be taken into page2.. but this page is more like a static one,.. and taking those operations into page2 would disturb the code organisation. Hope u understood..