HTML not recognizing JavaScript function

Joined
Oct 19, 2008
Messages
1
Reaction score
0
Hi,

I'm new to Java and I'm trying to trigger a Java function from an onchanged event for a checkbox. When the checkbox is clicked, it should trigger the Java function to make an imagebutton on the form visible.

Here is my Java code:
<script type="text/javascript" language="javascript">



function Show()
{
// var SelectedValue = document.getElementById('<%=ImageButton5.ClientID%>').value;
{
document.getElementById('<%=ImageButton5.ClientID%>').style.display = 'block';
}
</script>

here is the html code for the checkbox:


<asp:CheckBox
ID="CheckBox1" runat="server" AutoPostBack="True" CausesValidation="True" onchanged="Show()"
Visible="False" />

I do not get a runtme error, but the button isn't visible. Any help would be greatly appreciated!

Thanks,
kg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top