Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

updating regularly from server

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic