|
-
Feb 23rd, 2009, 06:03 AM
#1
Thread Starter
Fanatic Member
[2005] Show/Hide on Label click?
Guys,
Is this possible? I can't see why this is working. For reference, this is a custom user control that is hosted inside a repeater control on my main page.
Thanks
Bob
Code:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SectionControl.ascx.vb" Inherits="WebUserControl" %>
<asp:CheckBox ID="sectionna" runat="server" Text=" - " Checked="True" />
<asp:label ID="lbl_SectionName" runat="server" Font-Bold="true" Font-Size="Larger" Text="SectionName" OnClick='ShowHide();'/>
<br />
<asp:Panel ID="pnl_questions" runat="server" Visible="false">
<asp:HyperLink ID="doclink" runat="server" Width="260px">No Guidance Available</asp:HyperLink>
<asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Underline="True" ForeColor="#006600" Text="Yes / No" Width="70px"></asp:Label>
<asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Underline="True" ForeColor="#006600" Text="Category" Width="70px"></asp:Label>
<asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Underline="True" ForeColor="#006600" Text="VDS Code" Width="90px"></asp:Label>
<asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Underline="True" ForeColor="#006600" Text="Comment" Width="800px"></asp:Label>
<br />
<br />
<asp:Repeater ID="rpt_questions" runat="server">
<%--Implement--%>
</asp:Repeater>
</asp:Panel>
<script type="text/javascript">
<!--
function ShowHide() {
var e = document.getElementById("pnl_questions");
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
//-->
</script>
"I dislike 7 am. If 7 am were a person, I would punch 7 am in the biscuits." - Paul Ryan, DailyRamblings
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|