Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page Refresh Problems

Status
Not open for further replies.

waidc

Technical User
Mar 7, 2001
23
NZ
I am running a java news ticker and have set the page refresh (using the meta-equiv refresh tag) for two minutes. The problem is that every second or third time it refreshes, it won't reload the applet, and I am left with a blank grey bar. After a further two minutes, it loads it fine. Any suggestions would be greatly appreciated. Thanks.
 
The refresh method is not the best way of doing it, a better way would be to set a timeout.

<script>
<!--
setTimeout(&quot;sessionAlert()&quot;,60000)
function sessionAlert() {
location.href = location.href
}
//-->
</script> Regards

Big Dave


** If I am wrong I am sorry, but i'm only trying to help!! **

 
Thanks very much for your quick response - I've inserted your script and have fingers crossed!!

cheers
 
Unfortunately the same problem started occurring again after a few minutes. It seems to be a little dependent on cpu and memory load, particularly if using the internet, or editing any pages on the server it is hosted on.

I don't suppose there is any way to 'slow reload' a page to ensure the applet can be loaded (other than by putting a large image on it or something to force a slow load)??

A tricky one, this...!!

thanks.
 
A solution I thought of is to use a different type of new ticker one that loads in new content without having to refresh the page.

I have made a ticker tape in flash that updates new headlines every second. Regards

Big Dave


** If I am wrong I am sorry, but i'm only trying to help!! **

 
That sounds ideal - the whole idea of java applets has always confused me somewhat - do you have an example page with your ticker on it?

And, I guess more importantly, is it easy to create as my flash knowledge is also a little below par (although I have managed a few pretty animations in the past!)

thanks again for all your help...
 
Thanks Big Dave - I look forward to trying it out!
 
window.location.reload(true) or window.location.reload(1) doesn't work neither? (it is a question) Victor
 
Hi Victor,

Whereabouts should I be placing the instructions you outlined above? As a replacement for some of Big Dave's script or separately between their own <script> tags?

Thanks...
 
hi
waidc,

instead of

<script>
<!--
setTimeout(&quot;sessionAlert()&quot;,60000)
function sessionAlert() {
location.href = location.href
}
//-->
</script>

try

<script>
<!--
setTimeout(&quot;window.location.reload(true)&quot;,60000)
//or reload(1)
//-->
</script>

i'm not saying that that would work, just a suggestion to try any of these if those doesn't work
:) Victor
 
the reload(1) seems to have done the trick.

Thanks Victor and Big Dan for all your help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top