Forum Moderators: open
I have an application that requires an area of the screen to be refreshed with new data from the server every second.
I have currently implemented it using an iframe with the content of the iframe containing:
<Meta http-equiv="refresh" Content="2">
It also contains
onload="window.scrollTo(0,5000)"
as I need it to always display the end of the "data".
The iframe reference looks like:
<Iframe name="iframe" src="http://urlgetrequest" etc.>
It all works perfectly - the get request is processed and supplies the "updated" data.
There are two things wrong with this approach that I need to find solution to.
1) The refresh "blinks" (i.e. erases then redisplays) and it is annoying to users,
2) The bottom of the web browser blinks the get request and progress bar in a distracting manner as the new page is refreshed.
How can I fix this - and is there a better way to get "real-time" data from my server displayed in an area of the screen?
Please reply here or feel free to write to me at christopherdavidbear@yahoo.com.
- Christopher
don't want to blink, then don't refresh it.
2 seconds refresh are way too fast, I suggest 10 seconds refresh or above, because if the user urge to refresh the page, they can do it by themselves.
or you may add button which allow user manually refresh the page
<input type=button onclick="history.go();" name=refresh value=Refresh>
OR as link
<a href="javascript:void(0);" onclick="history.go();">Refresh</a>
[edited by: CloudLong at 3:07 pm (utc) on Dec. 29, 2003]
I can really do "anything" on the server side - what I need is to put something on the client side but not an applet.
It needs to blend in perfectly with the existing site and not to require any downloads or installs etc.
Ideally "something" would exist on the client side that can generate some form of get/post http request to get the data and then display it in a manner that I can "blend" with the website so that it all appears consistent (i.e. we cannot use a separate window).
I would be willing to contract the solution out to someone if they are interested in helping. I often have similar technology problems and it would be good to know someone who is a bit of a guru in such things (christopherdavidbear@yahoo.com).
Type "flash time entry application" into Google ... this'll help you to locate an article on Macromedia's site giving you some samples.
If this doesn't help, perhaps you can tap up the Macromedia Development community for further ideas.
Then of course there is the issue of a large number of threads on the server remaining open - I suppose that I can time them out but this will be difficult to manage in this case.
The chat room idea is an interesting analogy because this is "exactly" the behaviour that I ultimately need.
Someone else recently mentioned that one answer lies in this document:
[developer.apple.com...]
I have attempted to read it but it is a just a bit out of my league - especially since I really just want client-side cgi requests to display their results "gracefully" - I can handle the server side. This article is confusing in its references to the server code.
If any of you have a moment or two to look at it and let me know if it is steering me in the right direction (or even to translate it into a few steps or an example that would be really appreciated.
- Christopher
[ashleyit.com...]
Or just do a Google search for jsrs. Of course, if the user has JavaScript disabled you are hosed. Good luck.