Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Refresh with a query string

    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

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Lets see your refresh function....

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,960
    Thanks
    0
    Thanked 236 Times in 233 Posts
    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);


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •