| Author |
Get the ID of an element clicked on
|
Keith.P Smith
Ranch Hand
Joined: Feb 18, 2005
Posts: 339
|
|
Hi guys
I have a snippet of JS here which I would have expected to return the ID of the element for example say <image id='myImgTag'> I have clicked on, but for some reason it returns [ID:] where's I'd expect (hope) for something like [ID:myImgTag].
Any most likely obvious reasons this does not work and if possible, how do I get it to work?
Cheers in advance
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15003
|
|
How are you calling getClickElement?
Eric
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50693
|
|
Event handling, and just about everything else, is so much easier when you use jQuery to factor away all the IE-proprietary nonsense:
Life is too short to fuss around with if (IE this) if (IE that) and so on...
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Get the ID of an element clicked on
|
|
|