Heya Guys,
I have a bit of javascript as follows, this allows the panel bar to expand the item depending on an image clicked. I also need it to do the on click server event in the javascript. I have noticed there is an Item.click() for client side but i keep getting a 'Object does not support this property or method' javascript error on the click method.
--CODE--
I have a bit of javascript as follows, this allows the panel bar to expand the item depending on an image clicked. I also need it to do the on click server event in the javascript. I have noticed there is an Item.click() for client side but i keep getting a 'Object does not support this property or method' javascript error on the click method.
--CODE--
function
ImageClick(index)
{
var Menu = $find("<%= MenuBar.ClientID %>");
var item = Menu.findItemByValue(index);
for(var i = 0; i < Menu.get_allItems().length; i++)
{
Menu.get_allItems()[i].collapse();
}
if (item)
{
item.expand();
item.select();
item.click();
GetParents(item);
}
}
function
GetParents(item)
{
var parent;
parent = item.get_parent();
parent.expand();
if(!GetParents(parent))
{
return false;
}
}