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 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Live Data: Server to Client with No Refresh

    Hello,

    I am new to web design and I am trying to find a way that allows "real time" virtually instant page updating.

    The reason for this real time page updating is to show buy and sell points for my customers intraday futures trading (I would enter data on my side (server) and it would show up on my customers (client) web browser without them have to hit refresh).

    I do not know if I would have to create a server/client JAVA web application or if PHP, Coldfusion, or other would be simpler to create from.

    Any help would be greatly appreciated.

    Thank you in advance.

    RickAce

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Only thing you can do is set up the page to auto refresh after a set peroid of time. You can do it with meta tags or using setTimeout() with JavaScript.

    Without refreshing there is no way to get the new data....

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    You need to poll the server for every desired interval (maybe every 2 mins or so) and implement a remote call to the server through a hidden iframe technique. See this for more details of the technique.

  • #4
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    625
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe, try the PERL/CGI forum, and ask about server push, like that used in realtime chat clients. That will probably suit your needs.


    -james
    "God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life. For God did not send his son into the world to condemn the world, but so that through him the world might be saved. "

  • #5
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Java Applet can do it.. just look at everything at http://games.yahoo.com, I think it uses the MVC pattern..

    Flash might be able to do something similar, but I'm not sure (don't know much about Flash..)

    Sadiq.

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    just an addition to what glenngv then it can also be accomplished by script tags.

  • #7
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sad69
    I think it uses the MVC pattern..
    how do you know? do you know wot MVC is (apart from quickly referring to Google)?
    *keep it simple (TM)

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv
    You need to poll the server for every desired interval (maybe every 2 mins or so) and implement a remote call to the server through a hidden iframe technique. See this for more details of the technique.
    Here is a way without the need for IFRAME:
    Background Server Polls or Do-it-yourself remote scripting
    and a followup: Dynamically load data from another page
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Posts
    626
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here are some more resources, although Vladdys looks pretty good.
    http://www.oreillynet.com/pub/a/java...08/iframe.html

    http://www.ashleyit.com/rs/main.htm

  • #10
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jbot
    how do you know? do you know wot MVC is (apart from quickly referring to Google)?
    Well I'm pretty sure, I've made a Blackjack game in Java before with 2-4 players, and that's how I did it. It's the easiest way to update multiple clients by adding them as observers, and notifying them all that the model has changed.

    Regardless, Vladdy's method looks very cool! It sounds more like what you need, however, a setTimeout() "loop" will be needed in addition as RickAce explicitly said that clicking a button is not good enough.

    Good luck,
    Sadiq.


  •  

    Posting Permissions

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