Page view counter

ModalPopup Postback issues in Firefox 2.0.0.1

Rate It (1)

Last post 03-28-2007 12:09 PM by jfayling. 33 replies.

Sort Posts:

  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-26-2007, 2:59 AM
    • Loading...
    • Steve Marx
    • Joined on 05-26-2006, 8:35 PM
    • Microsoft
    • Posts 643
    • Points 2,460
    Thanks for confirming, Steve!
    Steve Marx | ASP.NET AJAX Evangelist | Microsoft Corporation
  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-26-2007, 3:33 AM
    • Loading...
    • Steve Marx
    • Joined on 05-26-2006, 8:35 PM
    • Microsoft
    • Posts 643
    • Points 2,460
    Steve Marx | ASP.NET AJAX Evangelist | Microsoft Corporation
  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-26-2007, 4:02 AM
    • Loading...
    • davestar
    • Joined on 11-07-2006, 7:50 AM
    • Paris
    • Posts 14
    • Points 43

    Hi, I confirm the bug, my collapsingPanel splashs with Firefox 2.0.0.2 and my modalpopup doesn't show ...
    If I come back to 2.0.0.1 my website works perfectly. There is no Javascript error or something I could fixe.

    Does anyone have a solution?

    thks
     

    --
    Cordialement
    David Verriere
    Developpeur Eureka-Technology.fr
    Etudiant Epitech Promo 2009
    Articles techniques sur : http://davidverriere.blogspot.com
  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-26-2007, 9:10 AM
    • Loading...
    • hazlema
    • Joined on 11-12-2006, 12:45 AM
    • Manchester, NH
    • Posts 24
    • Points 76

    Sorry my mistake, im 2.0.0.2.

     


    Matthew Hazlett
    Clarity Computers
    http://www.devclarity.com
  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-26-2007, 11:36 PM

    On a Side Note - this issue also seems to effect Firefox 1.5.0.10.

     I've been banging my head against a wall trying to figure out why code that worked previously is now broken.  Grrrrr.

    It appears that calls to the mpeInstance.Show() follows through all the code correctly, but breaks.  No javascript errors either.  <sigh>

    This last post on Bug 371576 mentions a workaround:

    "Yes.  Put whatever code depends on the newly appended script into a
    setTimeout(0)."

    Is this a valid workaround?  Lord, I hate those. 

    Thanks,
    Greg

  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-26-2007, 11:55 PM
    • Loading...
    • Steve Marx
    • Joined on 05-26-2006, 8:35 PM
    • Microsoft
    • Posts 643
    • Points 2,460

    Yes, I've tested that workaround by editing the ScriptLoader code in MicrosoftAjax.js, and it works.

    We're still investigating and deciding what to do internally at Microsoft.

    Steve Marx | ASP.NET AJAX Evangelist | Microsoft Corporation
  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-27-2007, 12:29 AM

    Steve,

     Thanks for the fast response.  Is this something we can modify ourselves?  I'd hate to be unsupported <grin>.  ;o)

     Thanks,
    Greg

  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-27-2007, 4:50 AM
    • Loading...
    • Seabass
    • Joined on 02-27-2007, 9:48 AM
    • Posts 3
    • Points 6

    I can confirm that Firefox v2.0.0.2 has issues concerning modalpopupextender.Show().

    -Sebastian 

  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-27-2007, 9:07 AM
    • Loading...
    • uolagNevets
    • Joined on 02-25-2007, 10:20 PM
    • Posts 20
    • Points 26
    Steve Marx:

    Yes, I've tested that workaround by editing the ScriptLoader code in MicrosoftAjax.js, and it works.

    We're still investigating and deciding what to do internally at Microsoft.

    Thanks for the workaround suggestion and the confirmation.. Is it possible to get an example code snippet of the workaround so that if needed I can implement it until a permenent solution is provided via update?  

    I am new to the toolkit, so please forgive my ignorance.  Is the workaround possible from a clinet modification, or is it a change to the toolkit source and a rebuild?  If the latter I could not find an instance on  MicrosoftAjax.js in my toolkit source.  Should the change be made to AjaxControlToolkit/ModalPopup/ModalPopupBehavior.js ?

     -Steve
     

    "Things should be made as simple as possible, but not any simpler." - AE
  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-27-2007, 9:18 AM

    Hi Steve,

    Actually, the MIcrosoftAjax.js file being referred to is one of the core javascript files used in the ajax framework.  You can find it in the directory you installed the ajax assemblies.  In any case, I'm avoiding making changes to it, if possible.  I'd hate for a change I make to that file to screw up anything else. 

    Thanks,
    Greg

  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-27-2007, 9:50 AM
    • Loading...
    • dapoussin
    • Joined on 02-26-2007, 9:44 AM
    • Paris, France
    • Posts 12
    • Points 54
    I can also confirm this bug occurs on Firefox 2.0.0.2 and not on 2.0.0.1, but you already know that for sure :)
  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-28-2007, 1:40 AM

    Hi All -

    If anyone wants a solution, this will work.

    For the HTML posted previously:

        <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:UpdatePanel ID="ModalUpdate" runat="server" UpdateMode="Always">
    <ContentTemplate>
    <asp:Button ID="ModalButton" runat="server" Text="Click Me" OnClick="ModalButton_Click" />
    <asp:LinkButton id="FakeControl" runat="server"/>
    <asp:Panel ID="ModalPanel" runat="server" height="100px" Width="200px" style="display: none">
    <div style="text-align: center">Modal Test Panel</div>
    <br />
    <asp:LinkButton ID="ModalClose" runat="server" Text="Close Window"/>
    </asp:Panel>
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" CancelControlID="ModalClose"
    PopupControlID=
    "ModalPanel" TargetControlID="FakeControl" runat="server"
    BehaviorID=
    "ModalPopup" />
    </ContentTemplate>
    </asp:UpdatePanel>
    </form>

     The only additional attribute is the "BehaviorID" on the ModalPopupExtender (see above).

     And then, in your code behind, instead of:

        Protected Sub ModalButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    Me.ModalPopupExtender1.Show()
    End Sub

     You put the following:

        Protected Sub ModalButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    ' Javascript broken out into separate function
    Me.OpenModalPopup()
    End Sub

    Private Sub
    OpenModalPopup()
    Dim retString As New System.Text.StringBuilder()
    With retString
    .Append("{ ")
    .Append(" window.setTimeout(""$find('ModalPopup').show();"",0); ") .Append("}")
    End With
    ScriptManager.RegisterStartupScript(Me, Me.GetType(), "
    openModalPopup", retString.ToString, True)
    End Sub

     That will work in both firefox 2.0.0.1 and 1.5.0.10 and all versions of IE.

    Ping me if you have any questions.

    Thanks,
    Greg
     

  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-28-2007, 2:04 AM
    • Loading...
    • AndresS
    • Joined on 06-10-2002, 8:40 PM
    • Posts 108
    • Points 519
    we are working with the firefox team actively to figure out the best approach to address this issue and we will update this thread as soon as we know more about it.
    AndresS


    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-28-2007, 9:35 AM
    • Loading...
    • uolagNevets
    • Joined on 02-25-2007, 10:20 PM
    • Posts 20
    • Points 26

    Excellent workaround Greg! 

    I convered your codebehind to C# to test and it works for me.. here is my conversion:

     

        protected void Page_Load(object sender, EventArgs e)
        {
            String s = "{ window.setTimeout(\"$find('ModalPopup').show();\",0); }";
            ScriptManager.RegisterStartupScript(Page, typeof (Page), "openModalPopup", s, true);
        }
    
        protected void ModalButton_Click(object sender, EventArgs e)
        {        
            ModalPopupExtender1.Show();          
        }
    

     

    -Steve 

     

    SamuraiProgrammer:

    Hi All -

    If anyone wants a solution, this will work.

    For the HTML posted previously:

        <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:UpdatePanel ID="ModalUpdate" runat="server" UpdateMode="Always">
    <ContentTemplate>
    <asp:Button ID="ModalButton" runat="server" Text="Click Me" OnClick="ModalButton_Click" />
    <asp:LinkButton id="FakeControl" runat="server"/>
    <asp:Panel ID="ModalPanel" runat="server" height="100px" Width="200px" style="display: none">
    <div style="text-align: center">Modal Test Panel</div>
    <br />
    <asp:LinkButton ID="ModalClose" runat="server" Text="Close Window"/>
    </asp:Panel>
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" CancelControlID="ModalClose"
    PopupControlID=
    "ModalPanel" TargetControlID="FakeControl" runat="server"
    BehaviorID=
    "ModalPopup" />
    </ContentTemplate>
    </asp:UpdatePanel>
    </form>

     The only additional attribute is the "BehaviorID" on the ModalPopupExtender (see above).

     And then, in your code behind, instead of:

        Protected Sub ModalButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    Me.ModalPopupExtender1.Show()
    End Sub

     You put the following:

        Protected Sub ModalButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    ' Javascript broken out into separate function
    Me.OpenModalPopup()
    End Sub

    Private Sub
    OpenModalPopup()
    Dim retString As New System.Text.StringBuilder()
    With retString
    .Append("{ ")
    .Append(" window.setTimeout(""$find('ModalPopup').show();"",0); ")
    .Append("
    }")
    End With
    ScriptManager.RegisterStartupScript(Me, Me.GetType(), "
    openModalPopup", retString.ToString, True)
    End Sub

     That will work in both firefox 2.0.0.1 and 1.5.0.10 and all versions of IE.

    Ping me if you have any questions.

    Thanks,
    Greg
     

    "Things should be made as simple as possible, but not any simpler." - AE
  • Re: ModalPopup Postback issues in Firefox 2.0.0.1

    02-28-2007, 11:25 AM
    • Loading...
    • tcartwright
    • Joined on 04-20-2004, 11:44 AM
    • Posts 11
    • Points 35
    I've been watching this thread intently for the past couple of days, as I just converted quite a few grids editors to this methodology. This took me off guard as I had just finished writing up a sample project for codepreoject here : http://www.codeproject.com/useritems/GridView-ModalPopupExtend.asp and not long after I posted it, boom. Hopefully you guys can find an answer soon, as I have to support Firefox.
    Tim Cartwright //Will write code for food
Page 2 of 3 (34 items) < Previous 1 2 3 Next >