We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Menu NavigateUrl

Thread ID:

Created:

Updated:

Platform:

Replies:

56796 Feb 21,2007 12:58 AM Feb 23,2007 04:25 AM ASP.NET Web Forms (Classic) 3
loading
Tags: Tools
Chad Dunham
Asked On February 21, 2007 12:58 AM

If I set the ClientSideOnItemSelect on the menu to be a javascript function listed below.

function DoSomething(oMenu)
{
alert(oMenu.NavigateUrl);
return false;
}

Then set all the MenuItems to have a value for the NavigateUrl. Why am I getting a messagebox that displays "undefined" rather than the NavigateUrl? Am I suppose to be accessing this attribute in another way?

Thanks

Chad

Valli [Syncfusion]
Replied On February 22, 2007 06:50 AM

Hi Chad,

The navigation url is passed as an argument to the javascript function which is invoked by the 'ClientSideOnItemSelect' property of the Menu Control.

Herewith attached a sample which illustrates the above.

http://www.syncfusion.com/Support/user/uploads/Menu_d0e1d4e9.zip

Please let us know if this helps you.

Thanks for using Syncfusion products.

Regards,
Valli

Chad Dunham
Replied On February 22, 2007 11:02 AM

Valli -

Thanks for the response. I have attached an updated version of the sample that you sent me. This new sample adds two new toplevel MenuItems to the menu (and one MenuItem to each of these) in the Page Load event. These new MenuItems look identical to me in the rendered HTML script. However, they function differently than those MenuItems that were added to the Items collection in the HTML source page. Why is this?

Thanks

Chad

Menu3.zip

Valli [Syncfusion]
Replied On February 23, 2007 04:25 AM

Hi Chad,

When the ClientSide function is defined in C# code, the arguments passed to the function should be embedded in quotes as below.

"GetNavigationUrl('http://www.syncfusion.com')"

The problem with Menu3.zip sample is '"' have been used to embed the arguments. '"' will be recognized only in the aspx page which accepts the html format.

Herewith I have attached the sample in which the reported issue has been rectified.

http://www.syncfusion.com/Support/user/uploads/Menu_c8a37cc1.zip

Please let us know if you have any other concerns.

Regards,
Valli

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;