I'm trying to get a popup menu to appear on an onclick client side event, when using a masterpage. Am using Vol 3 CLR3.5, have looked at the other posts indicating name versus ClientId within masterpages. This still is not working for me, even though the name is resolving properly. Here is my code:
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
{
alert(x);
igmenu_showMenu(x, event);
}
</script>
<ignav:ultrawebmenu id="UltraWebMenu1" runat="server" javascriptfilename="" javascriptfilenamecommon=""
targetframe="" targeturl="" webmenutarget="PopupMenu">
Cursor="Default">
</IslandStyle>
<HoverItemStyle BackColor="DarkBlue" Cursor="Default" ForeColor="White">
</HoverItemStyle>
<Images>
<SubMenuImage Url="ig_menuTri.gif" />
</Images>
<ItemStyle Cursor="Default" />
<Items>
<ignav:Item Text="Top Item">
</ignav:Item>
</Items>
<DisabledStyle Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Gray">
</DisabledStyle>
<Levels>
<ignav:Level Index="0" />
</Levels>
CustomRules="background-repeat:repeat-x; " />
<MenuClientSideEvents InitializeMenu="" ItemChecked="" ItemClick="" SubMenuDisplay="" ItemHover=""></MenuClientSideEvents>
</ignav:ultrawebmenu>
<a onclick="PopupMenu()">test</a>
</asp:Content>
I always get the proper name of ctl00_ContentPlaceHolder1_UltraWebMenu1, but then Popup menu name is not valid. What am I doing wrong? THanks.
Did you by chance get this resolved yet as i have run into the same issue.
I'm having the same problem. This means I can't use the menu control in any master page, repeater, grid control, anywhere where the ClientID resolves the name as a complex one.
Good for Infragistics...
Hello,
There is a little trick that one must make to overcome this limitation. The solution is really simple and can be accomplished in two easy steps:
1. Define an empty JavaScript variable in a Script section of your page, defined in the Header. Let's say something like this:
<script type="text/javascript" id="Infragistics"> var Menu1CorrectID="";</script>
2. Add one more script block, somewhere before the closing BODY tag, where initialize that variable with correct value:
<script type="text/javascript"> Menu1CorrectID='<%=this.Menu1.ClientID.Replace("_","") %>';</script>
Asuming Menu1 is the server ID for our UltraWebMenu control.
Hope this helps.
HI Infragistics Team ,
This Solution is Working Fine in IE 7 but its Not working for mozilla .
Can you please provide me the Solution,that how we can make it work for Mozilla .?
Thanks in Advance .