Let me preface this as saying this is not the way i wanted to code the functions (inline and hijacks), but i have to work around a 3rd party app config interface, with altering the source code as a final optionso i have an image that calls an onclick function\[code\] <img src="http://stackoverflow.com/questions/13845591/images/button_closed.gif" id="img100023" border="0" onclick="OnNodeImageClick(event, this)" href="http://stackoverflow.com/questions/13845591/theurl.cfm">\[/code\]the function takes the vars event, this and gets the url\[code\] function OnNodeImageClick(evt, clickedImage) { var href = http://stackoverflow.com/questions/13845591/clickedImage.getAttribute("href"); ...\[/code\]I need to do this exact same logic on a separate element that shares the original's id numbers\[code\] <span id="node100023" >External Links</span>\[/code\]What I have tried is this as the html\[code\] <span id="node100023" onclick="javascript:OverwriteToTreeHandler($(this).attr('id'))"> External Links</span>\[/code\]and this as my function\[code\] function OverwriteToTreeHandler(nodeID){ var clickedItem = 'img'+nodeID.replace(/[^0-9]/g, ''); //tried $('body').find( clickedItem ) didnt work OnNodeImageClick(event, clickedItem );}\[/code\]But i receive the following error -> Uncaught TypeError: Object img100023 has no method 'getAttribute' however by statically assigning the identifier in the HTMLWhat I have tried is this as the html , i get exactly the result I want\[code\] <span id="node100023" onclick="javascript:OnNodeImageClick(event, img100023)"> External Links</span>\[/code\]I assume this has todo with the parameters, and the fact when i attempt to dynamically get the element, it is not registering it as an object, but I am not connecting on how this is doneThanks in advance for any assistance