That's two different questions, for the second script, thumbII, add this function at the end of the script in the head:
Code:
function addAlt(imgobj, imgindex){
var alts=new Array();
alts[0]="Kissing Fools"
alts[1]="Seated Woman"
alts[2]="The Dog Lovers"
imgobj.getElementsByTagName('img')[0].alt=alts[imgindex]
}
Add this line (red part) to the function modifyimage(loadarea, imgindex):
Code:
function modifyimage(loadarea, imgindex){
if (document.getElementById){
var imgobj=document.getElementById(loadarea)
if (imgobj.filters && window.createPopup){
imgobj.style.filter=filterstring
imgobj.filters[0].Apply()
}
imgobj.innerHTML=returnimgcode(dynimages[imgindex])
if (imgobj.filters && window.createPopup)
imgobj.filters[0].Play()
addAlt(imgobj, imgindex);
return false
}
}
Notes: Most browsers will not give a "tooltip" from an alt tag when hovering over an image, only IE does that, if you want all browsers to see the 'tip', use:
Code:
imgobj.getElementsByTagName('img')[0].title=alts[imgindex]
instead.
Bookmarks