View Full Version : Disjointed rollover, swapping out alt tags and url locations?
molotov
August 10th, 2005, 10:41 AM
I'm using the basic old javascript disjointed rollover for some text links. After rolling over the image remains until a new link is rolled over, is there a way to have the alt tags change with the images, seems like it would be fairly easy. Just not sure how to make ref of the new alt tag text within the <img> tag.
Can alt=var1? But then the other problem is how do i ref the alt tag in the change image function?
this is my first issue, was also curious if it's possible to swap out links of each of these images.
molotov
August 10th, 2005, 10:55 AM
Just messing around this worked, it was a random guess, is images.alt valid or is this working for some random reason?
here is the code i added for the alt tag switch:
altTags = new Array();
altTags[01] = new String();
altTags[01] = "test1";
altTags[02] = new String();
altTags[02] = "2nd test";
in my changer function i added:
document.images[from].alt = altTags[to];
and the place holder image i just have an alt="blank"
molotov
August 10th, 2005, 01:33 PM
found my own answer, should anyone need a good code ref site, this one seems to be solid:
http://www.javascriptref.com/reference/object.cfm?key=91
molotov
August 10th, 2005, 03:06 PM
not sure if anyone is reading this thread but me but i got the disjointed rollover changing image,alt tag and link, so if anyone wants it i will post, its pretty simple, i've just never written much javascript so some of it was new to me.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.