Must reload after redirect

Hi ALL,

I call this single line of javascript on a form submission :


form.submit(window.parent.location = redirect_to_url);

After submission the user is redirected to the given ‘redirect_to_url’ BUT the changes are shown AFTER they manually refresh/reload the page… Is it possible to ‘tell’ the function

setTimeout('location.reload()', 0)

which URL to load?

Thank you in advance.

Is there a way for us to simulate the same problem that you’re having, so that we can come up with the best solution for you?

I hope there is a way :slight_smile:
OK, here’s a line which is called from a function when I need to reload the page :


form.submit(window.setTimeout('location.reload()', miliseconds_reload));

which is doing the job quite well… There’s another line in the same function which is called when I need to redirect the user to another page (usually AFTER modifying the database and to show the results). I’ve tried several javascript redirect methods i.e.:


form.submit(window.location = 'http://www.yourdomain.com');

The page is redirected but somehow the changes which were made at the previous page (ajax call) are not shown at the new page till page reload/refresh… Hope that makes sense to you and you can help me out! :slight_smile:
Thank you in advance.

I’m sorry, I’m having trouble duplicating the same sort of problem locally here.