[CLOSED] Dynamically loaded pages issue in Chrome and Firefox

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Dynamically loaded pages issue in Chrome and Firefox

    I have user controls which is loaded dynamically into panel:
     protected void Page_Init(object sender, EventArgs e)
            {
                if (Request["control1_ShowHideControl2"] == "true")
                {
                    var control2i = (control2)LoadControl("control2.ascx");
                    control2i.ID = "control2";
                    pnlControl2Content.ContentControls.Add(control2i);
                }
            }
    
    
            protected void ShowControl2(object sender, DirectEventArgs e)
            {
                try
                {
                    if (pnlControl2Content.FindControl("control2") == null)
                    {
                        var control2i = (control2)LoadControl("control2.ascx");
                        control2i.ID = "control2";
                        pnlControl2Content.ContentControls.Add(control2i);
                        ShowHideControl2.Text = "true";
                        pnlControl2Content.Render();
    
                    }
                }
                catch (Exception ex)
                {
    
                }
            }
    
            protected void HideControl2(object sender, DirectEventArgs e)
            {
                ShowHideControl2.Text = @"false";
            }
    <ext:Hidden ID="ShowHideControl2" runat="server" />
    <ext:Window ID="winControl2" runat="server" Hidden="true" Layout="Fit" Width="920"
        Height="430" Modal="true">
        <Items>
            <ext:Container ID="pnlControl2Content" runat="server" />
        </Items>
        <DirectEvents>
            <beforeshow onevent="ShowControl2">
                            <EventMask ShowMask="true" />
                        </beforeshow>
            <beforehide onevent="HideControl2" />
        </DirectEvents>
    </ext:Window>
    I have JavaScript function alertfnc in Content on control2.ascx:
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="control2.ascx.cs" Inherits="testtreedrid.control2" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <ext:FitLayout runat="server">
        <Items>
            <ext:Container ID="Container1" runat="server" Layout="Fit">
                <LayoutConfig>
                    <ext:ColumnLayoutConfig Split="true" />
                </LayoutConfig>
                <Items>
                    <ext:TreePanel ID="TreePanel1" runat="server" Animate="true" UseArrows="true" RootVisible="false"
                        AutoScroll="true" ColumnWidth="0.5">
                        <Loader>
                            <ext:PageTreeLoader OnNodeLoad="LoadDefaultCartItems">
                            </ext:PageTreeLoader>
                        </Loader>
                        <Root>
                            <ext:AsyncTreeNode Text="Cart Items">
                            </ext:AsyncTreeNode>
                        </Root>
                        <Buttons>
                                            <ext:Button ID="Button1" runat="server" Icon="CartGo">
                        <Listeners>
                            <Click handler="alertfnc();" />
                        </Listeners>
                    </ext:Button>
                        </Buttons>
                    </ext:TreePanel>
                </Items>
                          
            </ext:Container>
        </Items>
           <Content>
                    <ext:XScript ID="XScript1" runat="server">
                        <script type="text/javascript">
                            var alertfnc = function () {
                                alert('jopa');
                            }
                        </script>
                    </ext:XScript>
                </Content>
    </ext:FitLayout>
    This code works fine fo IE, but in FF and Chrome JS function not available
    Last edited by Daniil; Dec 12, 2011 at 2:55 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please try to move the script to Content of the Container1.
  3. #3
    It doesn't help. Still same issue
  4. #4
    Could you update from SVN? It should solve the problem.
  5. #5
    Any other options? We have big project and it is not easy to do full update of ext.net. It is full process of stress test of all components of the project involved :(
  6. #6
    Ok, I will try.

    Please clarify what Ext.Net sources do you use now? It can help to narrow down the problem.

Similar Threads

  1. [CLOSED] Compatibility with chrome and firefox issue
    By imaa in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Dec 20, 2011, 10:42 PM
  2. [CLOSED] Problem with Firefox and Chrome
    By Stefanaccio in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Dec 07, 2011, 12:43 PM
  3. Replies: 4
    Last Post: Nov 03, 2011, 6:46 PM
  4. as aspx pages loaded in tabs
    By jhohan25 in forum 1.x Help
    Replies: 2
    Last Post: Jun 02, 2011, 6:21 PM
  5. Problem with a example in Chrome and Firefox...
    By Tanielian in forum 1.x Help
    Replies: 2
    Last Post: Apr 07, 2011, 6:14 PM

Posting Permissions