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 .
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>
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'));};" >
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 ...