Check/toggle ‘em all
Recently I decided to clean up all the spam from an abandoned phpBB forum of mine, there was a lot to delete. In the phpBB version that I use there is no option to "check all" topics you want to moderate. So I came up with a little bookmarklet to do this for me. Here it is, only improved to work within frames and toggle (check if not checked, uncheck otherwise) all checkboxes in sight. Tested in FF and IE6/7.
To install, add this to your bookmarks/favourites:
The reading friendly code:
javascript:(function(){ function checkFrames(w) { try { var inputs = w.document.getElementsByTagName('input'); for (var i = 0; i < inputs.length; i++) { if (inputs[i].type && inputs[i].type == 'checkbox'){ inputs[i].checked = !inputs[i].checked; } } } catch (e){} if(w.frames && w.frames.length>0){ for(var i = 0; i < w.frames.length;i++){ var fr = w.frames[i]; checkFrames(fr); } } } checkFrames(window); })()
This entry was posted on Saturday, February 10th, 2007 and is filed under JavaScript, bookmarklets, phpBB. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Get notification for future posts: follow me on Twitter or subscribe to my RSS feed

August 1st, 2007 at 10:40 am
Why don’t you provide a sort of test page?
August 1st, 2007 at 11:27 am
yes, good idea. I’ll add a few check boxes in this post.
August 9th, 2007 at 1:35 pm
Thanks for this! Big help.
October 22nd, 2007 at 8:21 pm
Thanks!
March 1st, 2008 at 10:49 pm
Wow!… I needed this last night! It works! Kinda spooky!
April 18th, 2009 at 3:07 am
[...] install it simply go to the Toggle Em All website. You have the option to drag and drop the bookmarklet to the bookmark’s toolbar or to [...]
April 18th, 2009 at 10:57 am
[...] drag the bookmarklet from the Check/toggle ‘em all page to your browser bookmarks bar and click on it whenever you want to toggle between [...]
April 19th, 2009 at 12:02 am
[...] the Bookmark from here. Via [...]
April 19th, 2009 at 10:19 am
[...] without the bloat of extensions, make sure to check out our roundup of must handy bookmarklets. Toggle ‘Em All [via [...]
April 19th, 2009 at 10:21 am
Awesome, been looking for something like this for a while, to clean up an old guestregistration website. Thanks a bunch!
April 19th, 2009 at 10:30 am
[...] without the bloat of extensions, make sure to check out our roundup of must handy bookmarklets. Toggle ‘Em All [via [...]
April 19th, 2009 at 11:29 am
[...] without the bloat of extensions, make sure to check out our roundup of must handy bookmarklets. Toggle ‘Em All [via [...]
April 19th, 2009 at 12:09 pm
[...] without the bloat of extensions, make sure to check out our roundup of must handy bookmarklets. Toggle ‘Em All [via [...]
April 19th, 2009 at 2:08 pm
[...] without the bloat of extensions, make sure to check out our roundup of must handy bookmarklets. Toggle ‘Em All [via [...]
April 19th, 2009 at 2:19 pm
[...] without the bloat of extensions, make sure to check out our roundup of must handy bookmarklets. Toggle ‘Em All [via gHacks] Tagged:bookmarkletstime [...]
April 19th, 2009 at 7:27 pm
[...] without the bloat of extensions, make sure to check out our roundup of must handy bookmarklets. Toggle ‘Em All [via [...]
April 20th, 2009 at 12:04 am
[...] without the bloat of extensions, make sure to check out our roundup of must handy bookmarklets. Toggle ‘Em All [via [...]
April 20th, 2009 at 9:02 am
[...] Check/toggle ‘em all / phpied.com [...]
April 20th, 2009 at 6:53 pm
[...] without the bloat of extensions, make sure to check out our roundup of must handy bookmarklets. Toggle ‘Em All [via [...]
April 21st, 2009 at 9:30 am
[...] Check/toggle ‘em all / phpied.com (tags: checkbox toggle javascript bookmarklet) This entry was posted in Boostmarks. Bookmark the permalink. Comments are closed, but you can leave a trackback: Trackback URL. « links for 2009-04-17 [...]
April 21st, 2009 at 10:19 am
cool bookmarklet, can this check/toggle function be included for user-selected area? (provided there are checkboxes within the selection)
April 29th, 2009 at 5:30 am
Thanks! that was very cooool! I didn’t know there were such kind of javascript. Thanks!
May 8th, 2009 at 6:06 am
[...] link Leave a Reply [...]
February 27th, 2010 at 3:37 am
This is an awesome feature. Much better than going through the hassle of installing an addon. Thanks