Check all checkboxes on a website that only allows you do to it manually

// = Check all checkboxes on a website that only allows you do to it manually :id: 6cffeb5c-928f-46da-96b0-fc645eb4ca0e :author: Andrei Clinciu :website: https://andreiclinciu.net/ :publish_at: 2011-12-11 17:16:00Z :heading_image: \N :description: \N :type: article :tags: :keywords: :toc: left :imagesdir: ../assets/

image::{heading_image}[] So I had this issue the other day.. In 2009 some websites still have manual checkboxes.. Yeeks

You want to select all checkboxes on a website and it only allows you to do it manually?:D

Install firefox if you don’t already have it. Install firebug.

NOTE FROM 2016:  You can use almost any browser these days since they all seem to have copied the “inspect element” thing from Firebug.

Open firebug.. + type the following in the console:

…. function check_all_in_document(doc){var c = new Array();c = doc.getElementsByTagName(‘input’);for (var i = 0; i < c.length; i++){\tif (c[i].type == ‘checkbox’)\t{\t\tc[i].checked = true;\t}}}function checkem(){check_all_in_document(window.document);for (var j = 0; j < window.frames.length; j++){\tcheck_all_in_document(window.frames[j].document);}} ….

click run:) + have fun! + checkem();

Subscribe to my Newsletter

Receive emails about Linux, Programming, Automation, Life tips & Tricks and information about projects I'm working on