This is a migrated thread and some comments may be shown as answers.

Javascript Click not working

2 Answers 65 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 28 Aug 2008, 09:06 AM
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--

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;

    }

}

2 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 28 Aug 2008, 10:34 AM
Hello Ian,

Unfortunately, the provided information does not help us much in reproducing the error. I'm afraid we could not be of much help unless we reproduce the issue on our side. It will be best if you can open a support ticket and send us a simple running project (incl. your custom skin, CSS, images, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Best wishes,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Ian
Top achievements
Rank 1
answered on 28 Aug 2008, 01:48 PM
I decided to take another approach to the problem, instead of using the javascript click routine i just used the Ajax Panels, AjaxRequest Routine.

Cheers for the Help though guys

Ian
Tags
PanelBar
Asked by
Ian
Top achievements
Rank 1
Answers by
Paul
Telerik team
Ian
Top achievements
Rank 1
Share this question
or