Manipulating web form defaults
August 4, 2009 7:37 AM   Subscribe

Is it possible to have a web browser plugin/macro that will untick boxes on a webpage by default?

I am helping with a college club, and part of the job involves registering people for races. The difficulty is that the website that almost all race organizers use, checks boxes for all club members by default for every race. So if two people want to register for a race, I need to untick 50 boxes for every race.

I was wondering if there existed some type of plugin for firefox that could be used to untick these boxes. I usually use windows xp, but if answers are dependent on using Mac/Linux they would be also welcome as I sometimes use these OSes.
posted by a womble is an active kind of sloth to Computers & Internet (6 answers total) 1 user marked this as a favorite
Do you know who created the website? It might be worth contacting them to have a "check/remove all" checkbox added that can remove all checks with one click. It's a simple change.
posted by nitsuj at 7:45 AM on August 4, 2009

Response by poster: Yes - they were previously contacted about this, and did not change it. I will try again, but think that it will take them a long time to make the change (if ever). There are no established competitors for the service they provide unfortunately.
posted by a womble is an active kind of sloth at 7:51 AM on August 4, 2009

Best answer: You can definitely do this in GreaseMonkey. The code would be something like this:

var pageInputs=document.getElementsByTagName('input');
for (var i=0; i <> {
if (pageInputs[i].type=="checkbox")

Not guaranteed to work as-is, but that's the gist- you want to get all the inputs on the page, loop through them looking at their type, and unchecking the ones of type "checkbox".

It's highly possible someone's already done a script like this, if you search the GreaseMonkey library.
posted by mkultra at 7:56 AM on August 4, 2009

Gah, sorry, the for-loop should be:

for (var i=0; i <>

posted by mkultra at 7:57 AM on August 4, 2009

Best answer: Should be possible to write some kind of Javascript bookmarklet to do that: there are some examples here.
posted by Electric Dragon at 7:58 AM on August 4, 2009

Sorry, the for-loop should be:

for (var i=0; i < pageInputs.length; i++)

posted by mkultra at 7:58 AM on August 4, 2009

« Older Crafting a fun wedding gift   |   Is 1 hour and 45 minutes enough time to make this... Newer »
This thread is closed to new comments.