Reply
Bit of an issue with XPath
Old 02-08-2008, 10:32 PM Bit of an issue with XPath
WaHoOoO!'s Avatar
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....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
When You Register, These Ads Go Away!
     
Reply     « Reply to Bit of an issue with XPath
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11315 seconds with 13 queries