Page 1 of 1

Real time responce browser

Posted: Thu Jul 23, 2009 6:40 am
by azhan
Hello Guys,

I have made a browser which return a result of current patients waiting list, every time there is new patient came, his or her name will be displayed in sequence.

My method to retrieve the updated list is by keep refreshing it in 3 seconds on the META tag at html.

I was wondering is there any other way to retrieve the result in real time without keep refreshing it over and over again automatically.? I want to retrieve data from server in real time.

Thanks.

Azhan

Re: Real time responce browser

Posted: Thu Jul 23, 2009 6:49 am
by jackpf
Wait...do you mean you've made a browser or a web page?

Re: Real time responce browser

Posted: Thu Jul 23, 2009 6:52 am
by azhan
web page....haha...so sorry...

Re: Real time responce browser

Posted: Thu Jul 23, 2009 6:55 am
by arjan.top

Re: Real time responce browser

Posted: Thu Jul 23, 2009 6:56 am
by jackpf
Oh right...that makes more sense.

Well, you could use AJAX to check for new waiting lists, if there are any, then update the page to show them.

There are some good AJAX tutorials on the web...eg http://www.w3schools.com/Ajax/Default.Asp.

Good luck. If you have any specific problems feel free to post back.

Re: Real time responce browser

Posted: Thu Jul 23, 2009 6:59 am
by marty pain
Web pages are stateless, so you will have to refresh/reload the page to change it's state. You could redo the software in something like Java and have it in true real time, but if you want to keep it web based then it's got to be a refresh/reload.

Maybe look into using AJAX as it will probably be close to what you have in mind.

hahaha jackpf beat me to it!

Re: Real time responce browser

Posted: Thu Jul 23, 2009 7:06 am
by azhan
wow thanks! I will look any try for it...

I choose web based cos it is more interactive and easier....no training needed.

Re: Real time responce browser

Posted: Thu Jul 23, 2009 7:06 am
by Jenk
What the OP, and arjan.top are referring to is a persistent HTTP connection, i.e. it doesn't close, so the server can push data to the browser(s).

This is a useful tool but only really advisable on closed networks (which the OP sounds like they have!)

There is a Smalltalk framework called Comet (based on Seaside) for exactly this purpose.