Hi all,
I have this code, to create a slideshow:
<script language="JavaScript1.1">
<!--
//preload images
var img0=new Image()
img0.src="http://mypath.jpg"
img0.alt="MyPictureDescription"
...
//other pictures definition
//-->
</script>
then, in the body:
<script>
<!--
var step=0
var whichimage=1
function slideit(){
if (!document.images)
return
//If the browser is IE 4.x
if (document.all)
slide.filters.blendTrans.apply()
document.images.slide.src=eval("img"+step+".src")
document.images.slide.alt=eval("img"+step+".alt")
//If the browser is IE 4.x
if (document.all)
slide.filters.blendTrans.play()
whichimage=step
if (step<13)
step++
else
step=0
setTimeout("slideit()",4000)
}
</script>
For some reason, Explorer shows pictures and tooltip (pic description when
you mouse it over) as well,
Firefox does not.
Is there a way I can change the code so that Firefox will show the tooltips?
thanks
pcx99 - 30 Jan 2007 20:15 GMT
use title="description" this works in ANY tag not just images. IE's
approach is considered non-standard. Note that for images you'll still
need to supply ALT tags (it's required for validation services) but if
you want descriptive popups in anything other than explorer you'll need
to supply a title in addition to an alt attribute.
Hope this helps out a bit.
> Hi all,
> I have this code, to create a slideshow:
[quoted text clipped - 42 lines]
>
> thanks

Signature
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA
Randy Webb - 30 Jan 2007 23:12 GMT
Paulie "Walnut" Gualtieri said the following on 1/30/2007 2:11 PM:
> Hi all,
> I have this code, to create a slideshow:
Trash it and find a better script.
document.all does *not* mean it is IE4. Try testing your script in
Opera.....
eval is useless in that script.
javascript1.1
<!-- //-->
Yuck!

Signature
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/