Changing Images

A

ASM

Randy said:
but using the javascript: as an href is bad
practice, even in demo pages.

OK, OK and OK.

Am I authorised to use :
<a href="#" onclick="alert('hello');return false;">hello</a>
or
the inherent
problems with building them a certain way.
http://jibbering.com/faq/#FAQ4_24

got it.
It doesn't cover it explicitly in the FAQ, but it is a known side effect
of href="javascript: in some browsers to stop animated gifs from being
animated after it is clicked on.

Oh! poor browser ! anyway : animated gifs ... :-(
(i.e. IE isn't it ?
with version 7 and NGN, will no more trouble nor bugs ;-) )
I guess it's more about posterity and research problems/potential than
the demo itself.

saw
 
R

Randy Webb

ASM said the following on 8/13/2005 7:15 PM:
OK, OK and OK.

Am I authorised to use :
<a href="#" onclick="alert('hello');return false;">hello</a>
or
<a id="here"></a><a href="#here" onclick="alert('hello');">hello</a>
?

<shrug> Of the two, I would probably use the first one, or, return false
on the second one just to keep from changing the URL of the page. Push
comes to shove, with everything else involved in an Internet Site, I
would dynamically generate a button and use it's onclick so that I added
something like this:

<button onclick="something()">[+]</button>

Either document.write or createElement to create it. Then, if JS isn't
present, the user never sees it. Just don't fall into the NOSCRIPT trap.
got it.



Oh! poor browser ! anyway : animated gifs ... :-(
(i.e. IE isn't it ?

Yeah, good ole IE.
with version 7 and NGN, will no more trouble nor bugs ;-) )

ummm, IE without bugs? Yeah, right :)
 
P

Prophet

I like that - might have to try that on my page - I am new also and always
looking for cool stuff!!!
Thanks


ASM said:
Wade said:
08122005 1749 gmt-5

Ok. Tried that. Doesnt work on my pc.

Now, Im on linux using Firefox and Opera and there is no change on the
page.
I see that Stephane said that it works only with IE. The school is
moving to linux so firefox will be their browser as well.

Suggestion?

use what I did give on : 12/08/05 23:50
or
McKirahan's code modified as following :

<HTML>
<HEAD>
<TITLE>CountDown</TITLE>
<script type="text/JavaScript">
var pic = new Array(
"1.jpg",
"2.jpg",
"3.jpg",
"4.jpg");
var pix = 0;
var sec = 5;
function pictures() {
pix = (pix < pic.length-1) ? pix+1 : 0;
document.images['roll'].src = pic[pix];
departure = setTimeout("pictures()",1000*sec);
}
</script>
</HEAD>
<BODY onLoad="pictures()">
<img src="1.jpg" name="roll" border="0" alt="">
<p><a href="javascript:clearTimeout(departure);">[STOP]</a>
<a href="javascript:pictures();">[START]</a>
</BODY>
</HTML>

demo here :
http://perso.wanadoo.fr/stephane.moriaux/truc/count_pictures.htm
works with my IE and FF
 
A

ASM

Prophet said:
I like that - might have to try that on my page - I am new also and always
looking for cool stuff!!!
Thanks

Take care this example is not really a good stuff
because if images are heavy, I'm not sure next new image to display
is realy loaded when it is called.

Have a look on thread "loading images one by one"
and, particulary, example given by Lee on : 21/08/05 2:26
that works fine on DOM browsers (that's to say : not with NC4.5)

[snip]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,787
Messages
2,569,631
Members
45,338
Latest member
41Pearline46

Latest Threads

Top