Mentally Unstable Tugboat Captain
Posts: 797
Name: Chad
Location: /usr/bin/perl
|
I've got the following code, but for some reason it always returns true. I'm trying to get the script to see if /all/ checkboxes on a page are selected. If true, enable a text box. If false, disable it. alerts() are there for debugging.
Code:
<script type="text/javascript">
function anyCheck() {
var check = document.evaluate('//input[@type="checkbox" and not(@checked="checked")]', document, null, XPathResult.BOOLEAN_TYPE, null ).booleanValue;
// document.getElementById('submit').disabled = true;
if (check == true) {
// document.getElementById('submit').disabled = false;
alert ( 'True' );
}
if (check == false) {
// document.getElementById('submit').disabled = true;
alert ( 'False' );
}
}</script>
__________________
He's baaaaaaaack....
|