Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Frame Refresh code in HTML or Java Script

 
Rashmi Trivedi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends
Does any body know how to refresh the frames. I have a web page and within that i have 3 frame. I have writteen jsp code to refresh when it is being loaded however the frames do get refreshed.

any help please..

thanks and regards,
Rashmi Trivedi
 
P Lavti
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since each frame may have its body, you just need to write refresh code on onload of that body. That will refresh the frame as well. You can't refresh the frames separately.

For example if your frame is

Then you just need to refresh the main.jsp page to refresh mainFrame.

Hope it will help you!
 
P Lavti
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alternatively you can use

<frame id="mainFrame>
<body on Load="javascript: window.setTimeout(7000)">
</body>
</frame>

This will refresh the mainFrame after every 7 seconds. Check setTimeout() for more details.

To cancel the time out, use clearTimeout(). Form more details check clearTimeout().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic