Does the MenuBar buttons in WebMenu support direct URL linking?
Product Name: WebMenu for ASP.NET MVC
Product Version: 7.0
Document Type: Question
Last Updated: 4/23/2017
Document ID: 59

Yes, this ability is available through the OnMenuBarClick property on the Group object. This property allows you to execute client-side JavaScript from any MenuBar button click. The JavaScript code can be any type of supported action for the web browser, including loading a new page through the location.href property.

To open a new window:

group.OnMenuBarClick("window.open('http://www.domain.com/page', 'WindowName');")

To target the current page:

group.OnMenuBarClick("location.href = 'http://www.domain.com/page';")

To target a specific browser frame:

group.OnMenuBarClick("top.{framename}.location.href = 'http://www.domain.com/page';")

Note that {framename} is the NAME attribute of the <FRAME> tag provided in the FRAMESET document that you created. This value may be case-sensitive.

Copyright © 2024 Coalesys, Inc. All Rights Reserved.