Home
Products
Downloads
Support
Buy
Does the MenuBar buttons in WebMenu support direct URL linking?
Product Name: WebMenu Studio
Product Version: 7.0
Document Type: Question
Last Updated: 9/5/2016
Document ID: 58
Answer

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:

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

To target the current page:

objGroup.OnMenuBarClick = "location.href = 'http://www.domain.com/page';"

To target a specific browser frame:

objGroup.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.