Close
jGuru Forums
Posted By: Abdel_Olakara Posted On: Thursday, January 25, 2007 10:29 AM
Hi everybody, i have a javascript that render the XML response from a servlet. My trouble is i have to dynamically add onclick event to some of the elements that i render.. for example some XML elements are rendered as DIV that contain images. now when i write: component.className = "imgView"; component.onClick = functionName; My code applies the style sheet, but doesn't add the onClick or any other event property to div,img or any other HTML elements. How can i do this? add a event dynamically? Thanks in advance -- Abdel Olakara http://olakara.googlepages.com
Re: Dynamically setting events
Posted By: suresh_kumar Posted On: Friday, February 16, 2007 06:49 AM
Posted By: Axel_Richter Posted On: Thursday, January 25, 2007 12:56 PM
component.onclick = functionName;