HREF Function called twice when I click on a menu item image

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
annset
Beginner
Beginner
Posts: 5
Joined: Fri Aug 16, 2002 12:11 am

HREF Function called twice when I click on a menu item image

Post by annset »

Hello. I'm having a problem using <img> item items that reference javascript functions in my menus. Specifically, it appears that, when I click on these images, the javascript function is invoked *twice*. This only happens in internet explorer 5.5, sp2.

For example, suppose I set up my menu like this:

Code: Select all

addmenu(menu=[
"_vpToolbarMenuBar", 
112, 
186, 
, 
0,
,
_vpDefaultMenuBarStyle,
1, 
"left",
,,
1,
,  
,  
,
,
,
,
,
,
,
,"Actions","show-menu=menu1","#",,1
,"Properties","show-menu=menu2","#",,1
,"&nbsp;<img  src=\"images/icon_viewgraph_off.gif\" border=\"0\" title=\"View Graph\">&nbsp","javascript:if(doNothing())document.location=\"ft_index.html\"  ",,,0
])
Note that the last menu element (an image that appears directly on the menu bar) has a javascript statement as an href, which calls the "doNothing" function. When I click the image, that function is called twice.

This doesn't happen with non-image menu items.

Does anyone have any idea what may be causing this?

Thanks.

Ramsey
Post Reply