Is there a way to get the imagefilename and url of the image clicked on using clientside Javascript?
1 Answer, 1 is accepted
0
Accepted
Fiko
Telerik team
answered on 16 Feb 2009, 03:50 PM
Hello Henrik,
You could find the html element that wraps the items in the item template. You should attach a handler to the OnClientClick event of the RadRotator contro, then inside this handler you could follow this logic: (using the second parameter of the handler - arg ) :
Get the reference to the item that has been currently clicked on e.g :
var clickedItem = arg.get_item();
get the reference to the html item that wraps the item content ( the alert(htmlElement.innerHTML); function will print the content of this element ) :
var htmlElement = clickedItem.get_element(); // LI element
proceed with this element as a standard html element and find its child elements, depending of your ItemTemplate construction.