function selectAll(obj) {
var checkboxCount = 0;
for(i=0;i<document.forms[0].elements.length;i++) {
if(document.forms[0].elements[i].name=="auditLogIds") {
checkboxCount++;
if(checkboxCount > 1) {
break;
}
}
}
if(checkboxCount > 1) {
for(i=0;i<document.forms[0].auditLogIds.length;i++) {
document.forms[0].auditLogIds[i].checked=obj.checked;
}
}
else {
document.forms[0].auditLogIds.checked=obj.checked;
}
return;
}
February 19, 2008
JavaScript to select all checkboxes
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2008
(17)
-
▼
February
(17)
- HTML to Excel with JSP
- Basic JDBC: Executing a simple SELECT statement
- Hibernate 3.0 config file with database URL
- Hibernate 3.0 config file with JNDI datasource
- Hibernate mapping file
- org.hibernate.StaleObjectStateException
- Hibernate Tool - Reverse Engineering
- Generic toString() using reflection
- SWT - Browser
- SWT - Tree, Composite, Group, Tab, Popup Menu
- SWT - Slider, Scale, Progress, Combo, Menu, ToolBa...
- SWT - Label, Text, Button, List, Table
- Struts step-by-step
- JavaScript to select all checkboxes
- Fixed header in a datagrid
- Log4J 1.3 RollingFileAppender
- HowTo - GCJ: A native Java Compiler
-
▼
February
(17)
No comments:
Post a Comment