[OPEN] [#29] Error "tagName is null"

  1. #1

    [OPEN] [#29] Error "tagName is null"

    Hi,
    in attached sample, when I select the second value of the selectbox in the code:
    App.lblCollegamentoPagina.hide();
    I take the error "tagName is null"

    Sample:
    <%@ Page Language="C#" %>
    
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <script runat="server">
    
    
        protected void Page_Load(object sender, EventArgs e)
        {
          if (!X.IsAjaxRequest)
          {
            this._loadSbTipoLink();
            
            mnCollegamentoPagina_click();
          }
        }
    
    
        protected void mnCollegamentoPagina_click()
        {
          this.sbTipoLink.Select("T");
    
    
          this.lblHyperlink.Hide();
          this.txtHyperlink.Text = String.Empty;
          this.txtHyperlink.Hide();
          this.lblCollegamentoPagina.Show();
        }
    
    
        private void _loadSbTipoLink()
        {
          Ext.Net.ListItem li = null;
    
    
          li = new Ext.Net.ListItem();
          li.Text = "Hyperlink http";
          li.Value = "H";
          this.sbTipoLink.Items.Add(li);
    
    
          li = new Ext.Net.ListItem();
          li.Text = "Hyperlink https";
          li.Value = "S";
          this.sbTipoLink.Items.Add(li);
    
    
          li = new Ext.Net.ListItem();
          li.Text = "Tab";
          li.Value = "T";
          this.sbTipoLink.Items.Add(li);
    
    
          this.sbTipoLink.Select(0);
        }
    
    
    </script>
    
    
    <!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>
        <script type="text/javascript">
    
    
          var onSelect_sbTipoLink = function () {
    
    
            var tipoL = App.sbTipoLink.getValue();
    
    
            if (tipoL == 'T') {
              App.lblCollegamentoPagina.show();
              App.sbTabs.show();
              App.lblHyperlink.hide();
              App.txtHyperlink.hide();
            }
            else {
              App.lblCollegamentoPagina.hide();
              App.sbTabs.hide();
              App.lblHyperlink.show();
              App.txtHyperlink.show();
    
    
              App.txtHyperlink.setValue("");
    
    
              if (tipoL == 'H') {
                App.lblHyperlink.setText("Hyperlink (http://) :");
              }
              else {
                App.lblHyperlink.setText("Hyperlink (https://) :");
              }
            }
          }
    
    
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
          <ext:ResourceManager ID="ScriptManager1" runat="server" >
          </ext:ResourceManager>
    
    
    
    
         <ext:Panel
              id="pnlTableLayout2"
              runat="server" 
              Border="false"
              Layout="TableLayout">
              <LayoutConfig>
                <ext:TableLayoutConfig Columns="2"/>
              </LayoutConfig>
              <Items>
                  
                <ext:Label ID="lblSbTipoLink" runat="server" Text="Tipo link: " >
                </ext:Label>
    
    
                <ext:SelectBox ID="sbTipoLink" runat="server"
                  Editable="false"
                  SelectOnFocus="true"               
                  TypeAhead="true" 
                  Mode="Remote"
                  ForceSelection="true"
                  TriggerAction="All" 
                  EmptyText="Selezionare Tipo"
                  ValueNotFoundText="Loading..."
                  Width="300px"
                  
                  >
                  <Listeners>
                    <Select Handler="onSelect_sbTipoLink();" />
                  </Listeners>
                </ext:SelectBox> 
    
    
                <ext:Label ID="lblCollegamentoPagina" runat="server" Text="Tab collegato:"  >
                </ext:Label>
    
    
                <ext:Label ID="lblHyperlink" runat="server" Text="Hyperlink:">
                </ext:Label>
    
    
                <ext:TextField ID="txtHyperlink" runat="server" Width="420" MaxLength="255" >
                </ext:TextField>
    
    
              </Items>
            </ext:Panel>
    
    
        </form>
    </body>
    </html>
    Thank you

    Jimmy
    Last edited by Baidaly; Nov 16, 2012 at 11:25 PM. Reason: Issue created
  2. #2
    Hi Jimmy,

    Thank you for a sample. But, when I select the second item I'm getting
    App.sbTabs is undefined
    I can't see the "sbTabs" definition in your code.

    Could you, please, ensure the code reproduces the issue?
  3. #3
    Hi Daniil,
    I have removed the "sbTabs", the problem occurs in IE8:

    <%@ Page Language="C#" %>
    
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <script runat="server">
    
    
        protected void Page_Load(object sender, EventArgs e)
        {
          if (!X.IsAjaxRequest)
          {
            this._loadSbTipoLink();
            
            mnCollegamentoPagina_click();
          }
        }
    
    
        protected void mnCollegamentoPagina_click()
        {
          this.sbTipoLink.Select("T");
    
    
          this.lblHyperlink.Hide();
          this.txtHyperlink.Text = String.Empty;
          this.txtHyperlink.Hide();
          this.lblCollegamentoPagina.Show();
        }
    
    
        private void _loadSbTipoLink()
        {
          Ext.Net.ListItem li = null;
    
    
          li = new Ext.Net.ListItem();
          li.Text = "Hyperlink http";
          li.Value = "H";
          this.sbTipoLink.Items.Add(li);
    
    
          li = new Ext.Net.ListItem();
          li.Text = "Hyperlink https";
          li.Value = "S";
          this.sbTipoLink.Items.Add(li);
    
    
          li = new Ext.Net.ListItem();
          li.Text = "Tab";
          li.Value = "T";
          this.sbTipoLink.Items.Add(li);
    
    
          this.sbTipoLink.Select(0);
        }
    
    
    </script>
    
    
    <!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>
        <script type="text/javascript">
    
    
          var onSelect_sbTipoLink = function () {
    
    
            var tipoL = App.sbTipoLink.getValue();
    
    
            if (tipoL == 'T') {
              App.lblCollegamentoPagina.show();
              
              App.lblHyperlink.hide();
              App.txtHyperlink.hide();
            }
            else {
              App.lblCollegamentoPagina.hide();
             
              App.lblHyperlink.show();
              App.txtHyperlink.show();
    
    
              App.txtHyperlink.setValue("");
    
    
              if (tipoL == 'H') {
                App.lblHyperlink.setText("Hyperlink (http://) :");
              }
              else {
                App.lblHyperlink.setText("Hyperlink (https://) :");
              }
            }
          }
    
    
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
          <ext:ResourceManager ID="ScriptManager1" runat="server" >
          </ext:ResourceManager>
    
    
    
    
         <ext:Panel
              id="pnlTableLayout2"
              runat="server" 
              Border="false"
              Layout="TableLayout">
              <LayoutConfig>
                <ext:TableLayoutConfig Columns="2"/>
              </LayoutConfig>
              <Items>
                  
                <ext:Label ID="lblSbTipoLink" runat="server" Text="Tipo link: " >
                </ext:Label>
    
    
                <ext:SelectBox ID="sbTipoLink" runat="server"
                  Editable="false"
                  SelectOnFocus="true"               
                  TypeAhead="true" 
                  Mode="Remote"
                  ForceSelection="true"
                  TriggerAction="All" 
                  EmptyText="Selezionare Tipo"
                  ValueNotFoundText="Loading..."
                  Width="300px"
                  
                  >
                  <Listeners>
                    <Select Handler="onSelect_sbTipoLink();" />
                  </Listeners>
                </ext:SelectBox> 
    
    
                <ext:Label ID="lblCollegamentoPagina" runat="server" Text="Tab collegato:"  >
                </ext:Label>
    
    
                <ext:Label ID="lblHyperlink" runat="server" Text="Hyperlink:">
                </ext:Label>
    
    
                <ext:TextField ID="txtHyperlink" runat="server" Width="420" MaxLength="255" >
                </ext:TextField>
    
    
              </Items>
            </ext:Panel>
    
    
        </form>
    </body>
    </html>
    Thank you

    Jimmy
  4. #4
    Thank you.

    It looks a bug. I reported to Sencha.
    http://www.sencha.com/forum/showthread.php?246071

    Generally, TableLayout is rather weak layout. Personally, I would recommend to switch to another like HBox, VBox, Anchor or its combination.
  5. #5
    Sencha opened a bug ticket. We will monitor.
  6. #6
    Opened an Issue to track this defect, see

    https://github.com/extnet/Ext.NET/issues/29

Similar Threads

  1. [CLOSED] How does "MaskCls" work for "AutoLoad" mask in panel control
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 19, 2012, 12:09 PM
  2. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  3. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM
  4. Replies: 1
    Last Post: Jul 22, 2011, 5:34 PM
  5. Replies: 2
    Last Post: Jun 26, 2011, 1:59 AM

Posting Permissions