Forum Moderators: open
I am using an javascript to change the images on a HTML Page. I have an button which says "Next Image" and when clicked on it, a new image appears on the same HTML Page and so on upto 5 images. This is done using a javascript.
Also, I've a gif animation which is independent of the above said javascript which is on the same HTML page.
However, when I click on the "Next Image" the gif animation is stopped.
Please help!
With warm regards
Rajiv
I don't really have any links. I think something about it is burried in netscape's dev center. It is by design that it works this way, but like I siad it acts like a bug.
AaronAgassi,
By 'stalling' do you mean 'slowing down'? If that's the case, then it's because you are punishing the cpu with DHTML effects & animation (same might be said for you visitors too).
If the gif stops dead, then it still may not be related to the above problem (does it happen in IE too?). Your 'bubbles' effect is probably not started by a user clicking on a link.
Is it?
What to do?
If it is related to the current thingy, then you need to return false from whatever function is being called by the link. It maybe looks something like this:
function troubleWithBubbles()
{
..some code..
setInterval(...code...,delay) // or setTimeout
return false // <-- add this bit
}
But alas, this modification does not seem to work with the other pages using the same or similar scripts and manifesting the same problem. However, I notice that sometimes I can get the gifs to advance by minimizing and the restoring the browser. But how far they advance seems to depend upon how long I wait before restoring the browser. Indeed, they seem to be animating, unseen, but fail to refresh so as to actually become visible within the browser, IE, which I keep up to date...
And no, this issue is not a function of clicking a link, although I have seen that as well on another of my pages, where it produces an interesting artifact.
a) is contained in a closely wrapping block container [div, cell etc].
b) has a border (!=0).
If there's only a single background color to take care of on the page. I'll set:
body:{background-color: _aColour_;}
img{border: solid 1px _aColor_;}
The borders, when given any positive width, appear blue because the images are linked to other pages or else, otherwise, will appear black. Can I have an example statement of an image with it's own unique border color? (Again, the problem is already manifest without any images being clicked, and become moot once they are because a different page is opened.)
..hence div contained, The div may need to be exactly the same dims as the image.
The image may need explicitly declared dims (perhaps in tag attributes)
Can I have an example statement of an image with it's own unique border color?
#imageID{border:solid 1px #ffffff;} The borders, when given any positive width, appear blue because the images are linked to other pages
You will need to override the default link style / hover behaviour.
<a href="blah.htm" class="imglink"><img src="blah.jpg" width = ...></a>...css...
a.imglink:link,
a.imglink:visited,
a.imglink:hover
{
border:solid 1px #ffffff;
}
I can't think of a way to override link border styles with inline CSS. So no borders, but wrapped in divs seems the option. Back to this:
Can I have an example statement of an image with it's own unique border color?
<img src="etc" style="border:solid 1px red">
Still CSS, but inline. There's probably an HTML attribute option too.
assume that the gifs are called by the script in question
Nope. There was no script in that last post. In fact we'll probably soon be told to "get a room".
That always sorts out the problem, which only appears to happen in IE5.
Otherwise...dunno. Unless you are referring to a different problem. I'm talking about images breaking apart, and spreading over the page. However, it used to be the case that Netscape animated gifs differently to IE. It appeared that NN wasn't hiding the previous layer when playing the new over a constant background layer. So, many gifs with transparent areas on layers would look 100% pants on NN. I assumed they'd sorted this out in later versions.