Calling a javascript method when an asp:menu menuItem is selected?
-
I have a webpage with an asp:menu. I have menuItems in the menu. What I want to do is call a javascript function when the menuItem is selected but do not see an onselected or any selection event. Is there a way for me to just call a javascript function and not navigate to an url when the item is selected? Thanks, Steve
-
I have a webpage with an asp:menu. I have menuItems in the menu. What I want to do is call a javascript function when the menuItem is selected but do not see an onselected or any selection event. Is there a way for me to just call a javascript function and not navigate to an url when the item is selected? Thanks, Steve
I guess you need to look at the HTML that is generated, but I'd imagine if you make your 'url' javascript:myfunction()', that would work.
Christian Graus Driven to the arms of OSX by Vista.
-
I guess you need to look at the HTML that is generated, but I'd imagine if you make your 'url' javascript:myfunction()', that would work.
Christian Graus Driven to the arms of OSX by Vista.
When I add NavigateURL="javascript:function()" it only shows a page with the javascript source code? Note: this is an asp:menu. Thanks, Steve
-
When I add NavigateURL="javascript:function()" it only shows a page with the javascript source code? Note: this is an asp:menu. Thanks, Steve
O.K. I got it working! Thanks, Steve
-
O.K. I got it working! Thanks, Steve
Ok, so let the rest of us know the secret...:confused:
Regards, John McPherson "Sufficiently advanced technology is indistinguishable from magic." Arthur C. Clark, inventor of the telecommunications satellite