<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function checkAll() {
 var el = document.forms[0].elements;
 for(var i = 0 ; i < el.length ; ++i) {
  if(el[i].type == "checkbox") {
   el[i].checked = true;
 }
 }
}
function unCheckAll() {
var i=0;
for( i=0 ; i<document.forms[0].elements.length; i++) { 
        document.forms[0].elements[i].checked=0;
}
}

//  End -->
</script>

<input type="button" value="Check All"
onClick="checkAll();">&nbsp;&nbsp;
                <input type="button" value="Un-Check All"
onClick="unCheckAll(); return false;">

                <input type="Submit" name="submit" value="Process
Selected Items">

-----Original Message-----
From: Jillian Koskie [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 15, 2005 10:16 AM
To: CF-Talk
Subject: OT: JS and Checkbox Select

Hey guys,
 
I'm having a hard time making this work... it's probably my brain this
morning.
 
I have a form with a series of checkboxes for a search.  One is 'all
documents' and the rest identify certain containers.
 
I need some JavaScript that will deselect 'All Documents' if somebody
selects one of the other checkboxes.  Can somebody give me a hand?
 
These are my checkboxes:
 
<input type="checkbox" name="all_documents" value="1" checked>All
Documents
<input type="checkbox" name="annual_report" value="1">Annual Report
<input type="checkbox" name="book" value="1">Books and Studies
<input type="checkbox" name="briefing_paper" value="1">Briefing Papers
<input type="checkbox" name="issue_brief" value="1">Issue Briefs
<input type="checkbox" name="working_paper" value="1">Working Papers 
 
Thank you so much.
 
--
Jillian





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218413
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to