Jump to content

Uncheck boxes on separate page?


mcb359
 Share

Recommended Posts

Hi. I was wondering if it is possible to have two web pages, perhaps arranged in side by side frames, where one has a control that will check or uncheck all the checkboxes on the other page at once as though I had down down the checkbox page and checked/unchecked them all manually? The main reason for this is that I'm having to do a lot of this checking/unchecking on a website that I frequent and I was looking for a way to speed up the process.Thanks!

Link to comment
Share on other sites

Here is some code you can use to check all of the checkboxes that are on a page:

var inputs = document.getElementsByTagName("input");for(var i = 0; i < inputs.length; i++){	if(inputs[i].type == "checkbox")	{		inputs[i].checked = true;	}}

Then, if you are using Firefox, you can download the Firebug extension which allows you to open up a javascript console and execute any javascript you want on the page you are visiting. Paste that code into the console and hit Run, and all the checkboxes on the page you are visiting will be checked.I don't believe you are going to be able to do this using frames unless both sites are on the same domain. I may be wrong about that though.

Link to comment
Share on other sites

As far as executing this code goes, I feel compelled to pimp Opera. With Opera, you can save this code into a Javascript file and have Opera load the file on every page and just execute it, or you can also put Javascript code onto a button and put the button in your toolbar, so that clicking on the button would execute the Javascript associated with it. In this case, it would be a button that checks every checkbox on the page. You can check here for a bunch of custom buttons and instructions for making your own:http://operawiki.info/CustomButtons

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...