473,383 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Help with Alt for pics

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

Jan 30 '07 #1
2 1172
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.

Paulie "Walnut" Gualtieri wrote:
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

--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA
Jan 30 '07 #2
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!
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Laphan | last post by:
Hi All Sorry to be irate, but the whole concept of Server.MapPaths really has me in a tiswas!! In order to confirm once and for all, could you please advise me on the following: 1) There...
2
by: harold | last post by:
hi guys, i going mad trying to create a page that has the contents of a folder down one frame (pics, in list form) and when i click one of them it opens in the opposing frame. i have it just about...
4
by: Jorntk | last post by:
I have css in a folder name css. so how can this .css file read a pics file from another folder eg, pics/a.jpg. Both css folder and pics folder are located in a folder named project. I know i...
2
by: Laphan | last post by:
Hi All I know the subject sounds strange, but please bear with me. Using ADO/ASP, I want to retrieve a list of pics from my db (which will be dynamic number of pics as a user will be uploading...
1
by: Laphan | last post by:
First of all, my apologies for the xpost. I realise the netiqute, but this query seems to cross the boundaries of both these groups. Basically I have created a small ASP site that allows a user...
4
by: Gary | last post by:
Can somebody help me get the onMouseOut to work in this script? The onMouseOver works great opening a new window with an image, but I'd like to get the popup window to close onMouseOut. Is this...
13
by: Ikke | last post by:
Hi everybody, I've downloaded a design from www.oswd.org and have started rewriting the css and html to end up with a new design for my site. So far so good, but there are a few problems I...
0
by: U S Contractors Offering Service A Non-profit | last post by:
This Sunday the 26th 2006 there will be Music @ Tue Nov Inbox Reply Craig Somerford to me show details 9:54 pm (26 minutes ago) #1St "CLICK" HeAt frOm A blanket...
4
by: bob | last post by:
I am having trouble getting the PHP PECL fileinfo component to work. I am using Cakephp 1.2, XAMPP in WIndows Vista environment. I have the following code: $file =...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.