That works perfectly, Matt. Thanks! I've just got my zIndex changing to work, so now I'll see if I can put all the parts together.
Thanks again for your help, Matt. And thanks again, also, to Howard and Stephen for their useful comments and suggestions. Kind regards, Steven Olson P.O. Box 213 Sandpoint, ID 83864 [EMAIL PROTECTED] 208.304.9064 > -----Original Message----- > From: Matt C. [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 03, 2005 3:27 PM > To: [email protected] > Subject: Re: [wdvltalk] javascript help request > > > Actually, here's an even better way. No need to pass any specific > parameters... > > <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(anchorObject){ > theImage = anchorObject.getElementsByTagName("img").item(0); > for (x=0; x < > document.getElementsByTagName("img").length; x++){ > if (document.getElementsByTagName("img").item(x) == > theImage){ > alert("The image is index item " + x); > return false; > }; > }; > } > </script> > </head> > <body> > > <a href="#" onclick="alertImage(this);"><img src="test1.gif" width="100" > height="100"></a> > <a href="#" onclick="alertImage(this);"><img src="test2.gif" width="100" > height="100"></a> > <a href="#" onclick="alertImage(this);"><img src="test3.gif" width="100" > height="100"></a> > <a href="#" onclick="alertImage(this);"><img src="test4.gif" width="100" > height="100"></a> > > > > </body> > </html> > ____ • 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.
