I decided to post this as a new thread.
I'm reloading a page with an animated gif. When NS reloads the page it takes the graphic from cache -- no animation. Is there a script to clear the NS cache? The problem doesn't seem to exist in IE.
I decided to post this as a new thread.
I'm reloading a page with an animated gif. When NS reloads the page it takes the graphic from cache -- no animation. Is there a script to clear the NS cache? The problem doesn't seem to exist in IE.
Are you sure that is what is happening? An animated .gif is an image, and if cached, will still be animated whether retrieved from the cache or from the web. If the problem is that regardless of what I've just stated, it still acts like what you are saying and there is no other cause at work, this may help (requires a transparent .gif):
PLEASE: Include the URL to your problematic webpage that you want help with.HTML Code:<img src="transparent.gif" onload="if(this.src.indexOf('my_animated.gif')==-1)this.src='my_animated.gif'">
How are you reloading the page?
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Hi John.
The graphic is a transparent gif. It works fine in IE, but not in NS. If I manually clear the cache in NS before the reload, then it works. But only the next time. Then nothing.
The code's not on a server -- yet. So I can't let you look at it. But here's the "reload" code:
<script type="text/javascript">
<!-- Begin
function reFresh() {
window.location="Logo.html"
}
/* Set the number below to the amount of delay, in milliseconds,
you want between page reloads: 1 minute = 60000 milliseconds. */
window.setInterval("Doit()",15000);
// End -->
</script>
That won't do anything as Doit() is not defined.Originally Posted by Jim Weinberg
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Sorry. Didn't drag the cursor down far enough.
<script>
function Doit(){
parent.Logo.location='Logo.html';
</script>
Logo.html contains the animated gif.
You haven't closed the function block.
Urgh, nasty. I do not recommend this, due to the fact that non-JS browsers won't be able to see the image.Originally Posted by John
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
I didn't open one either. It works, trust me. Good point on non-JS browsers though. It was just something to try if there truly were a problem with the cache, which I don't think there is. After going over most (if not all) of the OP's posts though, I think it is just that his code is slipshod.Originally Posted by Twey
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Twey. Thanks for your input. I don't want to take a chance on it not working for non-js browsers.
BTW, its nice to see that not everyone has to make negative comments in order to show how "knowlegable" they are. I'm only 12 and am just starting out with JS. I was about to give up asking questions on this forum until I read your reply.
Thanks again.
I knew we were keeping Twey around for a reason.Originally Posted by Jim Weinberg
Jim, don't feel bad. There is plenty I do not know. It just gets frustrating when the code I need to see in order to help is not there. Also, it can reach a point where I don't know if what someone is posting is what they have or just a poor copy of it. In any case, regardless of my tone or how you feel about it, code must be written properly (for the most part) to work. There are exceptions in certain browsers and quirks of other browsers that should be respected if you want your code to work in them. But, as I say, don't give up. At least you are trying.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
I was referring to the OP's DoIt() function.Originally Posted by John
It's evidently my amazing people skills. Maybe I should become a banker.I knew we were keeping Twey around for a reason.![]()
![]()
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks