Hi everybody, I'm working with the WebDataMenu for NetAdvantage 9.2 and I'm having an issue where the eventArgs.set_cancel(true); is not working properly.
In my code, I do not want the WebDataMenu to post back when a specific item is clicked.
function OnItemClick(menu, eventArgs) {
var sPath = window.location.pathname;
var MenuItemName = eventArgs.getItem().get_text();
if ((sPath.endsWith('Home.aspx') == true) && (MenuItemName == "Home") ) { eventArgs.set_cancel(true); }
}
However, the code is not working correctly. What I find weird is that when I put alert statements in there, it works correctly.
if ((sPath.endsWith('Home.aspx') == true) && (MenuItemName == "Home") ) { eventArgs.set_cancel(true);
alert("Does not go here"); }
Any help would be greatly appreciated.
Thanks
Hi,
There was an issue with canceling the ItemClick event. Please upgrade to the latest service release for 9.2 build 2131 released around 7.July.2010. We have also added an AutoPostBack flags as an enhancement for the menu.
Thanks,
Lubomir