nkrishnaraj
Programmer
<html>
<head>
<script language="JavaScript">
function checkall() { for (i=1;i<=document.sender.ss.value;i++){
subu =new String("document.sender.chq["+i+"]"
temp(subu)
}
return true}
function temp(ss){
if (ss.checked){
alert("iN IF"
}
else{
alert("iN ELSE"
}
return true }
</script>
</head>
<body>
<form name =sender>
<input type=checkbox name = chq[1] onclick="return temp(this)"><br>
<input type=checkbox name = chq[2] onclick="return temp(this)"><br>
<input type=hidden name = ss value= 2>
<input type="button" name = "yes" value=Checkall onclick="return checkall()">
</form>
</body>
<html>
<head>
<script language="JavaScript">
function checkall() { for (i=1;i<=document.sender.ss.value;i++){
subu =new String("document.sender.chq["+i+"]"
temp(subu)
}
return true}
function temp(ss){
if (ss.checked){
alert("iN IF"
}
else{
alert("iN ELSE"
}
return true }
</script>
</head>
<body>
<form name =sender>
<input type=checkbox name = chq[1] onclick="return temp(this)"><br>
<input type=checkbox name = chq[2] onclick="return temp(this)"><br>
<input type=hidden name = ss value= 2>
<input type="button" name = "yes" value=Checkall onclick="return checkall()">
</form>
</body>
<html>