Here's what I'm trying to acheive:
A sub-menu item when clicked opens a new browser window via a javascript function that is referenced to from the html page that the main menu is part of.
Where in the sub-menu items code do I need to put the javasript? What would the syntax look like? Is this even possible? I was thinking may be in the URL attribute?
aI("text=3200;url=javascript:launchSharewire(PRODUCT_ID);status=3200;");
What you think anybody?
Javascript Function as menu item URL?
-
- Advanced
- Posts: 11
- Joined: Thu Mar 18, 2004 11:41 am
Jondoe,
The syntax in your example is exactly correct. Another method, if you want to use a different url in conjunction with an onclick handler, is to use the clickfunction property, like so:
You can also use the clickfunction property in the absence of the url property.
You may also want to refer to this sample to learn about onmouseover (onfunction) and onmouseout (offfunction) capabilities.
Hope that helps,
Kevin
The syntax in your example is exactly correct. Another method, if you want to use a different url in conjunction with an onclick handler, is to use the clickfunction property, like so:
Code: Select all
aI("text=Item text;url=theURL.html;clickfunction=launchSharewire(PRODUCT_ID);status=3200;");
Code: Select all
aI("text=Item text;clickfunction=launchSharewire(PRODUCT_ID);status=3200;");
Hope that helps,
Kevin