Oct 15, 2012, 1:20 PM
[OPEN] [#29] Error "tagName is null"
Hi,
in attached sample, when I select the second value of the selectbox in the code:
Sample:
Jimmy
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 youJimmy
Last edited by Baidaly; Nov 16, 2012 at 11:25 PM.
Reason: Issue created