So, I want to create a javascript command on my IE toolbar that will
run through the browser window and check all the boxes on the form. Is
this possible? If so, how?
Would you compromize for an item in your Favorites? In such case you
could use bookmarklet.
Copy the code below and save as HTML page. Open in your browser, right
click on "Check all" link and choose "Add to Favorites" ("Bookmark this
link" or however it's called in your UA). In IE you will get security
warning: click OK.
Now simply choose "Check all" bookmark any time you need it. Please not
that this code is very "greedy": it will check on whatever is
"checkable" on the current page. If it's too much, readjust the
algorithm and replace the bookmarlet with the new code.
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body>
<form method="post" action="">
<input type="checkbox" name="checkbox1" value="checkbox">
<input type="checkbox" name="checkbox2" value="checkbox">
<input type="checkbox" name="checkbox3" value="checkbox">
</form>
<p><a href="
javascript
:function checkAll() {
var elm = document.getElementsByTagName('input');
var len = elm.length;
for (var i=0; i<len; ++i) {
if ('checked' in elm[i]) {
elm[i].checked = true;
}
}
}
void checkAll();
">Check all</a></p>
</body>
</html>