redirection

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

redirection

Post by m2babaey »

Hi
I submit a form with Ajax
On successful insert, I used meta refresh in the <div> I displayed successful message to redirect user

Code: Select all

<meta http-equiv="refresh" content="0; url=index.php">
But it doesn't work
I wanted to use javascript window.location, but I have to place it on head or show a button with "onclick"

But I want the user to be redirected automatically and keep ajax submission of my form
Any idea?
Thanks
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: redirection

Post by kaszu »

Why use AJAX if you are reloading a page?
When you say AJAX you mean "asynchronous request to server", right?
Post Reply