<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Untitled</title> <script type="text/javascript"> function alertImage(imageID){ for (x=0; x < document.getElementsByTagName("img").length; x++){ if (document.getElementsByTagName("img").item(x).id == imageID){ alert("The image is index item " + x); return false; }; }; } </script> </head> <body>
<a href="#" onclick="alertImage('gnarleyImage1');"><img src="test1.gif" width="100" height="100" id="gnarleyImage1"></a>
<a href="#" onclick="alertImage('gnarleyImage2');"><img src="test2.gif" width="100" height="100" id="gnarleyImage2"></a>
<a href="#" onclick="alertImage('gnarleyImage3');"><img src="test2.gif" width="100" height="100" id="gnarleyImage3"></a>
<a href="#" onclick="alertImage('gnarleyImage4');"><img src="test2.gif" width="100" height="100" id="gnarleyImage4"></a>
</body> </html>
Steven Olson wrote:
Well, to be more precise, you'd use CSS rollovers in conjunction with
<a> tags so that you get IE's :hover support. You can also fake it by
changing the class name on mouseover, given that images have onmouseover
events.
Well, actually, I want to change the "stacking order" of a some divs that are stacked one on top of the other, not simply change the image that appears by editing the div's background property, or the img's source.
For now I'm going to try it by passing the index value as the parameter of the function. The function will be page-specific, but I'm sure I can get it to work. Perhaps later I'll try find the index value using another method - something to do with focus perhaps - and then rewrite the function to be more global.
Kind regards,
Steven Olson P.O. Box 213 Sandpoint, ID 83864
[EMAIL PROTECTED] 208.304.9064
____ • The WDVL Discussion List from WDVL.COM • ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To: [email protected] To change subscription settings, add a password or view the web interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016
Please include the email address which you have been contacted with.
____ • The WDVL Discussion List from WDVL.COM • ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To: [email protected] To change subscription settings, add a password or view the web interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016
Please include the email address which you have been contacted with.
