Need a javascript injection code to tick all checkboxes in a page with namess such as checkbox[0] to checkbox[145] Please help.
The code below should help get you on the right track <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <form name="testform" id="testform"> <input type="checkbox" value="1"><br> <input type="checkbox" value="2"><br> <input type="checkbox" value="3"><br> <input type="checkbox" value="4"><br> </form> <input type="button" onclick="checkthem()"> <script language="javascript"> function checkthem() { var myinputs = document.getElementsByTagName("input"); for (i=0;i< myinputs.length; i++) { if (myinputs.type == "checkbox") { myinputs.checked = true; } } } </script> </body> </html>
I dont know how to use this code. I would need a javascript injection to type in the address bar which solves the problem.. Thanks for the solution anyway. Appreciate the effort.