[CLOSED] TabPanel issue?

  1. #1

    [CLOSED] TabPanel issue?




    Hi, I have the a problem with TabPanel:





    
    
    
            function openExistingOrder( texturl ) {
    
    
    
                var tabPanel = <%= Pages.ClientID %>;
    
    
    
                var tab = tabPanel.add ({
    
    
    
                    id: 'Sale' + extractDocName( texturl, "doc" ),
    
    
    
                    title: extractDocName( texturl, "prot" ),
    
    
    
                    closable: true,
    
    
    
                        autoLoad: {
    
    
    
                            showMask: true,
    
    
    
                            url: texturl,
    
    
    
                            mode: 'iframe',
    
    
    
                            maskMsg: 'Loading: ...'
    
    
    
                        }                
    
    
    
                    });
    
    
    
               tabPanel.remove( tabPanel.activeTab, true );
    
    
    
               tabPanel.setActiveTab(tab);
    
    
    
            }




    I invoke this javascript from within an iframe, everything works fine, but firebugs give the following error





    
    
    Error: Ext is not defined
    
    
    File source: http://localhost:50204/extjs/ext-all...te.axd?v=18017
    
    
    Line: 228




    If I remove this line the error is not thrown anymore


    
    
     tabPanel.remove( tabPanel.activeTab, true );




    It's not a blocking problem, since everything keeps working, but it's
    very annoying, and I'm afraid it could generate new errors later.





    Is anyone can help me, please?





    Regards, Stefano
  2. #2

    RE: [CLOSED] TabPanel issue?

    Hi,

    I can't reproduce the problem. Can you show your test sample?
    Here is my test case:
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
        <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
        
         <script type="text/javascript">
            function addTab(tabPanel, id, url) {
                var tab = tabPanel.getComponent(id);
                if (!tab) {
                    tab = tabPanel.add({ 
                        id: id, 
                        title: url, 
                        closable:true,                    
                        autoLoad: {
                            showMask: true,
                            url: url,
                            mode:'iframe',
                            maskMsg: 'Loading ' + url + '...'
                        }                    
                    });
    
                    tabPanel.remove( tabPanel.activeTab, true );
                    tabPanel.setActiveTab(tab);
                }
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ScriptManager ID="ScriptManager1" runat="server" />
            
            <ext:Window runat="server" Width="700" Height="500" Icon="Link" Title="Adding tab">
                <Body>
                    <ext:BorderLayout runat="server">
                        <West>
                            <ext:MenuPanel ID="MenuPanel1" runat="server" Width="200">
                                <Menu>
                                    <Items>
                                        <ext:MenuItem ID="idClt_item" runat="server" Text="Coolite">
                                            <Listeners>
                                                <Click Handler="addTab(#{TabPanel1}, 'idClt', 'http://www.ext.net');" />
                                            </Listeners>
                                        </ext:MenuItem>
                                        
                                        <ext:MenuSeparator />
                                        
                                        <ext:MenuItem ID="idGgl_item" runat="server" Text="Google">
                                            <Listeners>
                                                <Click Handler="addTab(#{TabPanel1}, 'idGgl', 'http://www.google.com');" />
                                            </Listeners>
                                        </ext:MenuItem>
                                        
                                        <ext:MenuSeparator />
                                        
                                        <ext:MenuItem ID="idExt_item" runat="server" Text="ExtJS">
                                            <Listeners>
                                                <Click Handler="addTab(#{TabPanel1}, 'idExt', 'http://www.extjs.com');" />
                                            </Listeners>
                                        </ext:MenuItem>
                                    </Items>
                                </Menu>
                            </ext:MenuPanel>
                        </West>
                        
                        <Center>
                            <ext:TabPanel ID="TabPanel1" runat="server">                               
                            </ext:TabPanel>
                        </Center>
                    </ext:BorderLayout>
                </Body>
            </ext:Window>
            
            
        </form>
    </body>
    </html>
    Last edited by geoffrey.mcgill; Feb 22, 2011 at 4:31 AM.
  3. #3

    RE: [CLOSED] TabPanel issue?


    The page is very complicate, probalbly this is the source of problems.

    For now I leave it as is.... I will check to fix it at the end of develop and before go live.

    Thank you, as usually

Similar Threads

  1. [CLOSED] TabPanel: hidden Tab issue
    By RomualdAwessou in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 17, 2010, 5:36 PM
  2. [CLOSED] Tabpanel fit layout issue
    By edigital in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 30, 2010, 3:35 PM
  3. [CLOSED] Tabpanel + content issue
    By reinout.mechant@imprss.be in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 24, 2009, 11:07 AM
  4. [CLOSED] TabPanel loadContent Issue
    By Immobilmente in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 01, 2009, 1:03 PM
  5. [CLOSED] TabPanel and FieldSet issue
    By turione in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 27, 2009, 4:00 PM

Posting Permissions