We are using near-latest version of the product. In our web site we have to display dynamically generated (via javascript) context menus. We cannot generate them on the back-end because we don't know how many or what options there will be until the user takes certain actions. However, each menu item will come from the master menu-bar that is created on the back-end for the overall site.
When the user takes action, we use javascript to determine which menu items from the master menu-bar are needed within the context menu. For each item, we create a new item and add it to the context menu (ps - the context menu is declaratively created on our master page's html, albeit with no menu items):
var newItem = new Telerik.Web.UI.RadMenuItem();newItem.set_text(mainItem.get_text());
var navUrl = mainItem.get_navigateUrl();
newItem.set_navigateUrl(navUrl);
popMenu.get_items().add(newItem);
The problem is, when the navigate url is rendered, it is total mangled.
Here is an example link from the 'main' menu bar (which works perfectly):
<a class="rmLink" style="width: 268px;" href="javascript:goDnetPage('attrition_total_exempt','4829','functions/reports/front_ends/pages/HRMetrics.aspx','Report=attrition_total_exempt') "><span class="rmText">Total Attrition</span></a>
The 'value' of the href attribute, when assigned into the 'newItem' object is correct - we have console.logged it (via newItem.get_navigateUrl) and it is accurate. However, when the menu item is rendered by the menu code, it comes out as:
<a class="rmLink" href="javascript:goDnetPage(" '="" hrmetrics.aspx','report="attrition_total_exempt')" pages="" front_ends="" reports="" attrition_total_exempt','4829','functions=""><span class="rmText">Total Attrition</span></a>
Something, I presume within the Telerik js, is totally munging up the href value, creating additional attributes for the 'a' element as it sees fit. I have tried replacing/escaping single ticks and slashes, but cannot seem to get it to come out right.
Any advice would be appreciated. Thank you.