HTML not recognizing JavaScript function

Discussion in 'Java' started by kgriffin, Oct 19, 2008.

  1. kgriffin

    kgriffin

    Joined:
    Oct 19, 2008
    Messages:
    1
    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
     
    kgriffin, Oct 19, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roger Cantillo

    oleDBConnection not recognizing Database

    Roger Cantillo, Aug 28, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    3,092
    Kevin Spencer
    Aug 28, 2003
  2. =?Utf-8?B?Q3JhaWcgVHJheGxlcg==?=

    Visual Studio .Net not recognizing ASP.NET 1.1 on same machine

    =?Utf-8?B?Q3JhaWcgVHJheGxlcg==?=, Feb 20, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    516
    =?Utf-8?B?Q3JhaWcgVHJheGxlcg==?=
    Feb 20, 2004
  3. Mad Scientist Jr

    visual studio 2002 not recognizing framework 1.1

    Mad Scientist Jr, Mar 1, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    542
    Patrice Scribe
    Mar 1, 2004
  4. Rasheed

    Function not recognizing

    Rasheed, May 12, 2008, in forum: C++
    Replies:
    3
    Views:
    302
    fred.l.kleinschmidt@boeing.com
    May 12, 2008
  5. Greg G

    javascript not recognizing checkbox

    Greg G, Jul 7, 2006, in forum: Javascript
    Replies:
    0
    Views:
    111
    Greg G
    Jul 7, 2006
Loading...

Share This Page