Hi,
Am I missing something? The $find is not working for a RadPanelBar, here is the code:
I tried to put the script block on the header tag and in the body tag. If I replace by $get, it works, but then I can't access the findItemByText function. The funny thing is that I use a very similar code on other page and it works, the difference is that I use a RadMenu instead a RadPanelBar.
On, the call to checkMain() would be on the onload event of the body, I tried to move around to see if there was something to do with the timing of this call, but no luck.
Any help is appreciated.
Thanks,
Eduardo
Am I missing something? The $find is not working for a RadPanelBar, here is the code:
| ... |
| <body topmargin="0" leftmargin="0"> |
| <form id="form1" runat="server"> |
| <div> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <telerik:RadPanelBar ID="rpbNavigation" runat="server" style="width:100%" Skin="Outlook" EnableViewState="false"> |
| </telerik:RadPanelBar> |
| </div> |
| </form> |
| <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server"> |
| <script type="text/javascript"> |
| checkMain(); |
| function checkMain() { |
| var panelBar = $find("<%= rpbNavigation.ClientID %>"); |
| var item = panelBar.findItemByText(Main.selectedModule); |
| } |
| </script> |
| </telerik:RadCodeBlock> |
| </body> |
| ... |
I tried to put the script block on the header tag and in the body tag. If I replace by $get, it works, but then I can't access the findItemByText function. The funny thing is that I use a very similar code on other page and it works, the difference is that I use a RadMenu instead a RadPanelBar.
On, the call to checkMain() would be on the onload event of the body, I tried to move around to see if there was something to do with the timing of this call, but no luck.
Any help is appreciated.
Thanks,
Eduardo