...

View Full Version : Refresh with a query string



otisb
06-28-2004, 09:06 PM
I have a page that needs to auto refesh. The issue is that the user's id value is in the url ie: http://mysite.com?userid=007

What i need is to grab that value for the userid and apply that the javascript refresh function so the user does not get logged out. If you can please show me a sample of the javascript

Thank you
Otis

Willy Duitt
06-28-2004, 09:39 PM
Lets see your refresh function....

glenngv
06-29-2004, 05:56 AM
Using location.reload() won't require you to grab the querystring as it refreshes the page as if you click Refresh or Reload button.

setTimeout("location.reload(true)", 60000);

But if the page came from a POST request, a prompt will be displayed asking to reload the page or not. If that's the case, use this instead:

setTimeout("location.replace(location.href)", 60000);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum