Ajax Controls don't work with Firefox

Last post 11-19-2008 10:26 AM by ckincincy. 14 replies.

Sort Posts:

  • Confused [8-)] Ajax Controls don't work with Firefox

    11-17-2008, 10:53 AM
    • Member
      point Member
    • czy
    • Member since 11-17-2008, 3:30 PM
    • Posts 7

    Hi Guys

    I've got a problem. I'm building an ASP.NET webpage using .NET 3.5.
    Now I decided to put some cool ajax controls on my Page like the HoverControl or ModalPopup.
    I started it with IE 7, it worked perfectly and looked really sexy :-)

    Then I decided to test it with Firefox and plop it doesn't work.
    After that I thought nooooo I don't believe in such a fault of Firefox and I went to the example Page of the Ajax Controls.
    (http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Default.aspx) And tschaggaaaaa the examples work fine.

    So now I'm thinking the Problem could be .net 3.5. Does anybody has got a solution for me. Or am I all alone with that problem.

    Regards

    Patrick


     

  • Re: Ajax Controls don't work with Firefox

    11-17-2008, 11:08 AM
    • Member
      418 point Member
    • ckincincy
    • Member since 07-16-2007, 2:30 PM
    • Ohio
    • Posts 127

    What is it doing or not doing?

    - Clarence
    www.ocdprogrammer.com
    If a post was helpful to you, take a moment and mark it as the answer.
    CODE PROVIDED AS IS
    Yes, the license plate in my avatar is real.
  • Re: Ajax Controls don't work with Firefox

    11-17-2008, 11:21 AM
    • Member
      point Member
    • czy
    • Member since 11-17-2008, 3:30 PM
    • Posts 7

    Doing... Shows a Panel with Information when I move my Mouse over an Image (in IE 7)

    Not Doing... Shows a Panel with Information when I move my Mouse over an Image (in Firefox)

  • Re: Ajax Controls don't work with Firefox

    11-17-2008, 11:44 AM
    • Member
      418 point Member
    • ckincincy
    • Member since 07-16-2007, 2:30 PM
    • Ohio
    • Posts 127
    How are you detecting the mouse over?
    - Clarence
    www.ocdprogrammer.com
    If a post was helpful to you, take a moment and mark it as the answer.
    CODE PROVIDED AS IS
    Yes, the license plate in my avatar is real.
  • Re: Ajax Controls don't work with Firefox

    11-17-2008, 11:58 AM
    • Member
      point Member
    • czy
    • Member since 11-17-2008, 3:30 PM
    • Posts 7

    I dont need to. It's the Ajax Hovercontrol.

    I just bind the control to the ajax HoverMenuExtender.

    <asp:Image id="btnHover" runat="server"
    ImageUrl="~/myImage.gif">
    </asp:Image>

    ---------------------------------------------------------------

    <asp:Panel CssClass="popupMenu" ID="PopupMenu"
    runat="server" Style="display: none;">
    <strong>
    <asp:Label ID="myLabell" runat="server" />
    </strong>
    </asp:Panel>

    ---------------------------------------------------------------

    <ajaxToolkit:HoverMenuExtender ID="hme2" runat="Server"
    TargetControlID="btnHover"
    PopupControlID="PopupMenu"
    HoverCssClass="popupHover"
    PopupPosition="Left"
    OffsetX="-10"
    OffsetY="-10"
    PopDelay="50" />

  • Re: Ajax Controls don't work with Firefox

    11-18-2008, 8:03 AM
    • Member
      418 point Member
    • ckincincy
    • Member since 07-16-2007, 2:30 PM
    • Ohio
    • Posts 127

     Wrap your button in a panel and make that panel the TargetControlID.

    - Clarence
    www.ocdprogrammer.com
    If a post was helpful to you, take a moment and mark it as the answer.
    CODE PROVIDED AS IS
    Yes, the license plate in my avatar is real.
  • Re: Ajax Controls don't work with Firefox

    11-18-2008, 8:42 AM
    • Member
      point Member
    • czy
    • Member since 11-17-2008, 3:30 PM
    • Posts 7

    Doesn't work.

  • Re: Ajax Controls don't work with Firefox

    11-19-2008, 1:28 AM

    Hi,

    I think the cause is the different css style between FireFox and IE. Have you tried to give the targeControl a positive position, set a valid css class to the ‘HoverCssClass’ or set the PopupPosition to ‘Right’?

    Here is my sample similar to yours: http://forums.asp.net/p/1317091/2612306.aspx#2612306

    Have my suggestions helped?

    Best regards,

    Zhi-Qiang Ni

    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
    Answer” if a marked post does not actually answer your question.
  • Re: Ajax Controls don't work with Firefox

    11-19-2008, 4:14 AM
    • Member
      point Member
    • czy
    • Member since 11-17-2008, 3:30 PM
    • Posts 7

    Unfortunately it still doesn't work.

    But thanks for your suggestions.

  • Re: Ajax Controls don't work with Firefox

    11-19-2008, 9:19 AM
    • Member
      point Member
    • czy
    • Member since 11-17-2008, 3:30 PM
    • Posts 7

    well I think the Problem is the Datagrid. Because actually the Control, the PopupPanel and the ajax extender are located in a asp template column.

    On a blank page it works fine.

    datagrid column looks something like that:

     

    <asp:TemplateColumn HeaderText="Info" >
    	<ItemTemplate>	
    <asp:Image id="btnHover" runat="server"
    ImageUrl="~/Pics/button-info.gif">
    </asp:Image>
    <asp:Panel CssClass="popupMenu" ID="PopupMenu"
    runat="server" Style="display: none;">
    <strong>
    <asp:Label ID="lblDescription" runat="server" OnLoad="Description_Load" />
    </strong>
    </asp:Panel>
    <ajaxToolkit:HoverMenuExtender ID="hme2" runat="Server"
    TargetControlID="btnHover"
    PopupControlID="PopupMenu"
    HoverCssClass="popupHover"
    PopupPosition="Left"
    OffsetX="-10"
    OffsetY="-10"
    PopDelay="50" /> <HeaderStyle Width="10%"></HeaderStyle>
    </asp:TemplateColumn>

     

    The Problem is I cant put the panel and the extender outside of the datagrid, because then they don't know my control (btnHover) anymore.

    maybe someone has a good idea on that.

    Greets

    Patrick

  • Re: Ajax Controls don't work with Firefox

    11-19-2008, 9:39 AM
    • Member
      418 point Member
    • ckincincy
    • Member since 07-16-2007, 2:30 PM
    • Ohio
    • Posts 127

     Can you set the properties of the HoverMenuExtender in code behind?  I am thinking that it isn't smart enough to get the 'new' id's that the panels have due to their relation within the datagrid.

    - Clarence
    www.ocdprogrammer.com
    If a post was helpful to you, take a moment and mark it as the answer.
    CODE PROVIDED AS IS
    Yes, the license plate in my avatar is real.
  • Re: Ajax Controls don't work with Firefox

    11-19-2008, 10:01 AM
    • Member
      point Member
    • czy
    • Member since 11-17-2008, 3:30 PM
    • Posts 7

    No I can't see the Properties. :-( Yea seems to be not as smart as I hoped.

  • Re: Ajax Controls don't work with Firefox

    11-19-2008, 10:17 AM
    • Member
      418 point Member
    • ckincincy
    • Member since 07-16-2007, 2:30 PM
    • Ohio
    • Posts 127

     You can see the properties, just have to do it differently... will post code in a few.

    - Clarence
    www.ocdprogrammer.com
    If a post was helpful to you, take a moment and mark it as the answer.
    CODE PROVIDED AS IS
    Yes, the license plate in my avatar is real.
  • Re: Ajax Controls don't work with Firefox

    11-19-2008, 10:26 AM
    Answer
    • Member
      418 point Member
    • ckincincy
    • Member since 07-16-2007, 2:30 PM
    • Ohio
    • Posts 127

     Here is something I've done.  The DataGrid has an ItemDataBound event:
    protected void YourDataGridView_ItemDataBound(object sender, RepeaterItemEventArgs e)
            {
                if (e.Item.ItemType == ListItemType.Item ||
                    e.Item.ItemType == ListItemType.AlternatingItem) /// Makes sure you aren't on the header or footer
                {
                    TextBox txtQty = (TextBox )e.Item.FindControl("txtQty") as TextBox ;
                    TextBox txtSize = (TextBox )e.Item.FindControl("txtSize") as TextBox ;

                    Image btnHover = (Image) e.Item.FindControl("btnHover") as Image;

                    Panel popupMenu = (Panel) e.Item.FindControl("popupMenu") as Panel;

                    HoverMenuExtender hme2 = (HoverMenuExtender) e.Item.FindControl("hme2") as HoverMenuExtender;

                     hme2.TargetControl=btnHover.ClientId;//thinking its clientid... all from my head here

                     etc....

               }
            }

    - Clarence
    www.ocdprogrammer.com
    If a post was helpful to you, take a moment and mark it as the answer.
    CODE PROVIDED AS IS
    Yes, the license plate in my avatar is real.
  • Re: Ajax Controls don't work with Firefox

    11-19-2008, 10:26 AM
    • Member
      418 point Member
    • ckincincy
    • Member since 07-16-2007, 2:30 PM
    • Ohio
    • Posts 127

     Ignore these lines... forgot to delete:

                    TextBox txtQty = (TextBox )e.Item.FindControl("txtQty") as TextBox ;
                    TextBox txtSize = (TextBox )e.Item.FindControl("txtSize") as TextBox ;

    - Clarence
    www.ocdprogrammer.com
    If a post was helpful to you, take a moment and mark it as the answer.
    CODE PROVIDED AS IS
    Yes, the license plate in my avatar is real.
Page 1 of 1 (15 items)