Results 1 to 4 of 4

Thread: Java checkbox, onCheck alert

  1. #1
    Join Date
    Apr 2009
    Posts
    13

    Java checkbox, onCheck alert

    hi
    I want to form some checkboxes where i am completely new with java directly on like prototype project .i want to know checkbox formation and also tell me how to set alerts with checkbox .also tell me how to use checkbox in html to unhides on checked and hides on unchecked .
    thank you .

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Java checkbox ,onCheck alert

    i found this just try this code

    <html>
    <head>
    <script type="text/javascript">
    function toggle(e, show) { e.style.visibility = show ? 'visible' : 'hidden' }
    onload = function() { toggle(document.getElementById('info'), false) }
    </script>
    </head>
    <body>
    <script type="text/javascript">
    document.write('<div><label for="toggle"><input type="checkbox" onclick="toggle(document.getElementById(\\'info\\'), this.checked)" id="toggle">Show/Hide</label></div>');
    </script>
    <div id="info" style="visibility: visible">This is some extra information.</div>
    </body>
    </html>

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Java checkbox ,onCheck alert

    for checkbox input type you can see this pages or just try this
    <input type="checkbox" id="chk" onCheck="alert('Hi')" onUnCheck="alert('Bye')" onclick="if(this.checked){eval(this.getAttribute('onCheck'));}else if(!this.checked){eval(this.getAttribute('onUnCheck'));};" >

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: Java checkbox ,onCheck alert

    I just use the onclick and it works, thank you.

    <TD Align='left' height='64%'> <input type='checkbox' name ='Classification' value='SGA_network_ID' onclick= "WhenChecked()"> SGA network ID </ TD>
    and function Onchecked ()
    Code:

    WhenChecked function ()
    (
    if (document. form. Classification [2]. checked == 1)
    (
    document. form. Sganet_textbox. disabled = false;
    )
    else
    (
    document. form. Sganet_textbox. disabled = true;
    )
    )
    it works without the timeout ...

Similar Threads

  1. AVAST popup Trojan alert redirBA-inf and Malware alert script-inf
    By Wajid^ali in forum Networking & Security
    Replies: 6
    Last Post: 06-06-2011, 01:38 AM
  2. CheckBox in SilverLight
    By KALYAN23 in forum Software Development
    Replies: 6
    Last Post: 17-08-2010, 05:19 PM
  3. Flash CheckBox in Flex
    By AARON Carter in forum Windows Software
    Replies: 6
    Last Post: 15-07-2010, 11:24 AM
  4. Alert Message in Java
    By Bhagwandas in forum Software Development
    Replies: 3
    Last Post: 09-12-2009, 08:45 AM
  5. add Checkbox in Ms Excel spreadsheet
    By Novino in forum Windows Software
    Replies: 4
    Last Post: 02-09-2009, 09:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,007,598.30924 seconds with 16 queries