Results 1 to 5 of 5

Thread: How to make the value updated always?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509

    How to make the value updated always?

    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:32 PM.

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099
    do you mean something like this

    Code:
    <META HTTP-EQUIV="Refresh" CONTENT="5; URL=pagename.php">
    how are u using the php file? thought a webbrowser control or as a script run from the command line?

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    HTTP is a stateless protocol. The only times when there is communication between the client and the server is when the client is requesting something. After that, they disconnect (for all you know, they might keep the connection alive for performance reasons), and the server never knows if the users has left the site or is still looking at it.

    A reload meta would do it, except that it disrupts the user's action every 5 seconds. The same in an iframe wouldn't disrupt the user though. But there's no way you can get informed if the user leaves, you can only time him out, and that doesn't take effect until he comes back.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2003
    Posts
    509
    Inva
    Last edited by raladin; Mar 29th, 2014 at 10:32 PM.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Have a timer in the VB to send the request every 5 seconds. Then, on the server, if no request has come for ~15 seconds (= what you should allow for bad connections) you "know" that the user has gone away. Only that no script gets executed, but the last timestamp at least still records the last time the user contacted the page. When you get the next request, you can check on this and send the user back to the login.

    Of course, this is bad. If I was on a dialup I'd disconnect as soon as I had the page, and I wouldn't want the app try to connect to the net every 5 seconds.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width