B
Beffmans
hi
I am trying to make this label visible through a checkbox. I try to make
use of javascript but what am I doing wrong?
<HTML>
<HEAD>
<title>WebForm1</title>
<script>
function f_check()
{
if (document.getElementById("CheckBox1").checked)
return true;
else
return false;
}
</script>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 80px; POSITION:
absolute; TOP: 48px" runat="server"
Width="160px" Height="16px" Visible="javascript:f_check();">hello
there!!!!</asp:Label>
<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 264px; POSITION:
absolute; TOP: 48px" runat="server"
Text="is label visible or not?"></asp:Button>
<asp:CheckBox id="CheckBox1" style="Z-INDEX: 103; LEFT: 80px;
POSITION: absolute; TOP: 88px" runat="server"
AutoPostBack="True"></asp:CheckBox>
</form>
</body>
</HTML>
thanks
B.
I am trying to make this label visible through a checkbox. I try to make
use of javascript but what am I doing wrong?
<HTML>
<HEAD>
<title>WebForm1</title>
<script>
function f_check()
{
if (document.getElementById("CheckBox1").checked)
return true;
else
return false;
}
</script>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 80px; POSITION:
absolute; TOP: 48px" runat="server"
Width="160px" Height="16px" Visible="javascript:f_check();">hello
there!!!!</asp:Label>
<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 264px; POSITION:
absolute; TOP: 48px" runat="server"
Text="is label visible or not?"></asp:Button>
<asp:CheckBox id="CheckBox1" style="Z-INDEX: 103; LEFT: 80px;
POSITION: absolute; TOP: 88px" runat="server"
AutoPostBack="True"></asp:CheckBox>
</form>
</body>
</HTML>
thanks
B.