DrupalBin
Submit Code
About
Recent Posts
Code
8 hours 22 min
ago
Code
12 hours 39 min
ago
Logging without output buffer trouble
13 hours 30 min
ago
Code
14 hours 20 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for Javascript: Select multiple checkbox
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
<script type="text/javascript"> <!-- /* status da seleção dos checkbox do formulário */ var checked = false; /** * doCheck * * Ativa e Desativa todo checkbox de um determinado formulario. * * @author Wellington Rodrigues <wellingtonbr@gmail.com> * @since 2008 * @copyright Desenvolvendo Sites.com * @version 1.0 * @param string strForm * @return void */ function doCheck(strForm){ if(strForm){ objForm = document.getElementById(strForm); for(i=0; i < objForm.elements.length; i++) if(objForm.elements[i].type == "checkbox") if(checked == false) objForm.elements[i].checked = true; else objForm.elements[i].checked = false; if(checked == false) checked = true; else checked = false; } } //--> </script>
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.