Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 19-05-2009
Members
 
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 .
Reply With Quote
  #2  
Old 19-05-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: Java checkbox ,onCheck alert

i found this just try this code

Quote:
<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>
Reply With Quote
  #3  
Old 19-05-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: Java checkbox ,onCheck alert

for checkbox input type you can see this pages or just try this
Quote:
<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'));};" >
Reply With Quote
  #4  
Old 19-05-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: Java checkbox ,onCheck alert

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

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

Quote:
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 ...
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 12:35 PM.