Reply
Old 07-28-2010, 04:46 PM [solved]Javascript Check All
Red_X_'s Avatar
Super Talker

Posts: 131
Location: Houston
Trades: 0
Essentially the check all button works. But some of the fields are prone to be disabled depending on part of the data.

How would I go about using the select all, to not select the ones that are not disabled?

PHP Code:
            if ($rows > 0) {
                ?>            
                            <input type="checkbox" disabled="disabled" name="chkbxSelected[]" id="list" value="<?php echo $row['id'?>"/>
                <?php
                        
} else {
                
?>
                            <input type="checkbox"name="chkbxSelected[]" id="list" value="<?php echo $row['id'?>"/>
                <?php
                        
}
                
?>
Code:
function checkAll(field)

{

    for (i = 0; i < field.length; i++) {
        if(!field[i].disabled) {
            field[i].checked = true; 
        }
    }
}
--> solved never mind. <--
__________________
"Good News Everyone, by reading this your hearing my voice."

Last edited by Red_X_; 07-28-2010 at 05:10 PM.. Reason: bold text is added text.
Red_X_ is offline
Reply With Quote
View Public Profile Visit Red_X_'s homepage!
 
 
When You Register, These Ads Go Away!
Old 07-28-2010, 05:16 PM Re: Javascript Check All
chrishirst's Avatar
Super Moderator

Posts: 32,316
Location: Blackpool. UK
Trades: 0
http://www.candsdesign.co.uk/article...ll-checkboxes/

I'll get a link drop in instead then
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Code Samples | Crowded Nightclub? | Random Ramblings
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Javascript Check All
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.11102 seconds with 13 queries