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

RadMenu with Javascript

1 Answer 76 Views
Menu
This is a migrated thread and some comments may be shown as answers.
PPI Itdept
Top achievements
Rank 1
PPI Itdept asked on 06 Oct 2011, 06:00 PM

I have a page called Default.aspx and in that page I have a radmenu, label, search button and iFrame.
The menu consists of Home, Products, Variants, Finished Goods, Sub Assembly ect. By default the Home item is highlighted.
When the user clicks the search button a list of items are displayed in a rad window. From here the user chooses an item, the window closes and iFrame gets loaded with FinishedGoods.aspx (in this example).
In the FinishedGoods.aspx body onload I have a function that gets called and finds the menu and label in the Default.aspx.

 

 

 

parent.document.getElementById('lblBreadCrumb').innerText = 'Finished Goods'; // label
var menu = parent.document.getElementById('rmMain').attributes; // RadMenu

 

I'm trying to get the Finished Goods in the menu to be highlighted/selected and the Home not be highlighted/selected.

How do I go about doing this with the RadMenu?

I also attached an image.

Thanks

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 07 Oct 2011, 10:57 AM
Hi Ppi Itdept,

Did you try to use client-side and set_cssClass property that sets the desired css class. Here is an example how you can apply it:

varmenu=$find("MainMenu");
varitem1 = menu.findItemByText("A");
item2.set_cssClass("rmFocused");


All the best,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Menu
Asked by
PPI Itdept
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or