aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes updating regularly from server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "updating regularly from server" Watch "updating regularly from server" New topic
Author

updating regularly from server

Joe Schaffer
Greenhorn

Joined: Mar 24, 2004
Posts: 29
Hi,

I have a small problem regarding a regular update from a server.

I need to have a page with two frames, where one frame reloads a special information from the server every 30 seconds, in prinziple like a automatically updating newsticker. The problem is, the second frame should not be effected at all. The information entered there in fields have to be available! Can anyone give me a small example how to do this in frames and javascript? I'm pretty sure it's not very much of code if you know how to do it.

Thx in advance for your help

Joe
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15362
    
    6
in the body tag of the html document. you can use

<body onload="setTimeout('document.location.reload()',30000)">

or

<body onload="setTimeout('document.location.href=document.location.href',30000)">

or you can look up refresh META tags on google.

Eric
Joe Schaffer
Greenhorn

Joined: Mar 24, 2004
Posts: 29
Ok, but how can I implement two different styles there.

I generate the entire code in functions, which then are called in a servlet. (I haven't divided it into frame pieces yet)

Can I do it like this, that I have two frame tags, while in the first one I assign it directly to a page and reload this one, the way you describer, and in the second one I put the code I dynamically generat as before, means I have my HTML code, just put <FRAME></FRAME> around it and a second <FRAME></FRAME> set for the part to reload?

Joe
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: updating regularly from server
 
Similar Threads
Counter
sharing Panel between frames
Struts and Frames
HTTP Servlet Response
Frame within Frame