This must be some basic oversight by me. All I want is a context menu with a single item that, when clicked, goes to a URL in a new window. I am able to navigate by double-clicking the item, but not single-clicking. My code is like this:
<ig:WebDataMenu ID="mnuPopup" runat="server" IsContextMenu="True"> <Items> <ig:DataMenuItem NavigateUrl="http://www.google.com" Text="Test Item" Target="_blank"> </ig:DataMenuItem> </Items> </ig:WebDataMenu>
and in the page I have this:
<div id="divTickets" runat="server" oncontextmenu="return false;" onmousedown="showPopup();">
and this:
function showPopup() { var menu = $find("<%= mnuPopup.ClientID %>"); var evt = window.event; if (menu != null && evt != null && evt.button == 2) { menu.showAt(null, null, evt); } }
Do I have to write my own code to find the item and get its URL, then window.open? Seems like a single click should be the default behavior for activating items.
Thanks.
We are still on 9.2. Maybe this is something that was a problem and is fixed in the latest version? I also fixed my code to work in FF (window.event is a no-no) and had the same problem there.
Hi,
your code works perfectly fine and the google page is opened in a new window. Which version are you using?
Thanks,
Lubomir