Welcome visitor
* Login
* Register
It is currently September 19th, 2019, 4:45 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  help with checkboxes script
PostPosted: August 16th, 2009, 4:51 am 

Posts: 19
where can i find a script or tutorial for a checkbox that when is checked/unchecked it checks/unchecks the rest of the checkboxes? Thanks. Any help is appreciated.


Top
 Profile  
 
  Re: help with checkboxes script
PostPosted: August 16th, 2009, 5:54 am 
User avatar

Posts: 112
right here, hth
<script>
function checkUn(s){
if (s==1){
for (i=0; i<document.forms[0].length; i++){
document.forms[0].elements[i].checked=true;}}
else{
for (i=0; i<document.forms[0].length; i++){
document.forms[0].elements[i].checked=false;}}
}
</script>
</head>
<body>
<form>
<input type="checkbox"><br />
<input type="checkbox"><br />
<input type="checkbox"><br />
<input type="checkbox"><br />
<input type="checkbox"><br />
<input type="checkbox" onclick="checkUn(this.checked);"> Select or Deselect All
</form>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron