version 1.19, 2004/08/23 16:53:06
|
version 1.20, 2004/09/13 16:21:30
|
Line 118 function process(calling,numauto,nummanu
|
Line 118 function process(calling,numauto,nummanu
|
} |
} |
} |
} |
if (calling == "viewclass") { |
if (calling == "viewclass") { |
document.forms.studentform.state.value = "process"; |
|
var totcheck = 0 |
var totcheck = 0 |
|
var numchk = 0 |
if (numauto > 0) { |
if (numauto > 0) { |
for (var i=0; i<document.studentform.chgauto.length; i++) { |
numchk = countChecked(document.studentform.chgauto); |
if (document.studentform.chgauto[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (nummanual > 0) { |
if (nummanual > 0) { |
for (var i=0; i<document.studentform.chgmanual.length; i++) { |
numchk = countChecked(document.studentform.chgmanual); |
if (document.studentform.chgmanual[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (numlock > 0) { |
if (numlock > 0) { |
for (var i=0; i<document.studentform.lockchg.length; i++) { |
numchk = countChecked(document.studentform.lockchg); |
if (document.studentform.lockchg[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (numunlock > 0) { |
if (numunlock > 0) { |
for (var i=0; i<document.studentform.unlockchg.length; i++) { |
numchk = countChecked(document.studentform.unlockchg); |
if (document.studentform.unlockchg[i].checked == true) { |
totcheck = totcheck + numchk |
totcheck ++ |
|
} |
|
} |
|
} |
} |
if (totcheck > 0) { |
if (totcheck > 0) { |
checker = 1 |
document.forms.studentform.state.value = "process"; |
} else { |
} |
|
if (totcheck == 0) { |
alert("You must check at least one checkbox, before proceeding to the next page") |
alert("You must check at least one checkbox, before proceeding to the next page") |
checker = 0 |
checker = 0 |
} |
} |
Line 163 function process(calling,numauto,nummanu
|
Line 152 function process(calling,numauto,nummanu
|
if ($action eq 'viewclass') { |
if ($action eq 'viewclass') { |
$scripttag .= qq| |
$scripttag .= qq| |
function checkAll(field) { |
function checkAll(field) { |
for (i = 0; i < field.length; i++) |
if (field.length > 0) { |
field[i].checked = true ; |
for (i = 0; i < field.length; i++) { |
|
field[i].checked = true ; |
|
} |
|
} else { |
|
field.checked = true |
|
} |
} |
} |
|
|
function uncheckAll(field) { |
function uncheckAll(field) { |
for (i = 0; i < field.length; i++) |
if (field.length > 0) { |
field[i].checked = false ; |
for (i = 0; i < field.length; i++) { |
|
field[i].checked = false ; |
|
} |
|
} else { |
|
field.checked = false ; |
|
} |
|
} |
|
|
|
function countChecked(field) { |
|
var count = 0; |
|
if (field.length > 0) { |
|
for (var i=0; i<field.length; i++) { |
|
if (field[i].checked == true) { |
|
count ++ |
|
} |
|
} |
|
} else { |
|
if (field.checked == true) { |
|
count ++ |
|
} |
|
} |
|
return count |
} |
} |
|
|
|; |
|; |
} |
} |
$scripttag .= qq| |
$scripttag .= qq| |