{"absolute_url": "/KadeJM/checkbox-with-select-all-function-javascript-html/", "blog_post": false, "code": "\n\n\n\nUntitled Document\n\n\n\n\n
\n\n
\n\n
\n\n
\n\n
\n\n
\n\n
\n\n\n
\n\n\n", "created": "2016-03-23T12:42:42.943921", "description": "Here's a checkbox script with a select all option.", "description_rendered": "Here's a checkbox script with a select all option.", "embed_url": "https://snipt.net/embed/c95ae51c3713569c1ea42b9ed696f3ab/", "full_absolute_url": "/KadeJM/checkbox-with-select-all-function-javascript-html/", "id": 144910, "lexer": "js", "line_count": 45, "log_entries": [{"code": "\n\n\n\nUntitled Document\n\n\n\n\n
\n\n
\n\n
\n\n
\n\n
\n\n
\n\n
\n\n\n
\n\n\n", "created": "2016-03-23T12:42:42.961085", "diff": "--- \n+++ \n@@ -0,0 +1,45 @@\n+\n+\n+\n+\n+Untitled Document\n+\n+\n+\n+\n+
\n+\n+
\n+\n+
\n+\n+
\n+\n+
\n+\n+
\n+\n+
\n+\n+\n+
\n+\n+\n+", "user": "KadeJM"}], "meta": null, "modified": "2019-06-20T01:18:35.625159", "publish_date": "2016-03-23T12:42:42.904186", "raw_url": "/raw/c95ae51c3713569c1ea42b9ed696f3ab/", "resource_uri": "/api/public/snipt/144910/", "slug": "checkbox-with-select-all-function-javascript-html", "stylized": "
 1\n 2\n 3\n 4\n 5\n 6\n 7\n 8\n 9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n<title>Untitled Document</title>\n<script type="text/javascript">\nchecked=false;\nfunction checkedAll (frm1) {\n\tvar aa= document.getElementById('frm1');\n\t if (checked == false)\n          {\n           checked = true\n          }\n        else\n          {\n          checked = false\n          }\n\tfor (var i =0; i < aa.elements.length; i++) \n\t{\n\t aa.elements[i].checked = checked;\n\t}\n      }\n</script>\n</head>\n\n<body>\n<form id ="frm1">\n<label for="checkbox"> Eurgonomic Design </label>\n<input type='checkbox' name='Eurgonomic Design' onclick='checkedAll(frm1);'><br> \n<label for="checkbox"> Option 1 </label>\n<input type="checkbox" name="Option 1"><br>\n<label for="checkbox"> Option 2 </label>\n<input type="checkbox" name="Option 2"><br>\n<label for="checkbox"> Option 3 </label>\n<input type="checkbox" name="Option 3"><br>\n<label for="checkbox"> Option 4 </label>\n<input type="checkbox" name="Option 4"><br>\n<label for="checkbox"> Option 5 </label>\n<input type="checkbox" name="Option 5"><br>\n<label for="checkbox"> Option 6 </label>\n<input type="checkbox" name="Option 6">\n</form>\n\n</body>\n</html>\n
\n
", "tags": [{"absolute_url": "/public/tag/javascript/", "id": 7, "name": "javascript", "resource_uri": "/api/public/tag/7/", "snipts": "/api/public/snipt/?tag=7"}, {"absolute_url": "/public/tag/html/", "id": 67, "name": "html", "resource_uri": "/api/public/tag/67/", "snipts": "/api/public/snipt/?tag=67"}, {"absolute_url": "/public/tag/function/", "id": 210, "name": "function", "resource_uri": "/api/public/tag/210/", "snipts": "/api/public/snipt/?tag=210"}, {"absolute_url": "/public/tag/js/", "id": 259, "name": "js", "resource_uri": "/api/public/tag/259/", "snipts": "/api/public/snipt/?tag=259"}, {"absolute_url": "/public/tag/checkbox/", "id": 3830, "name": "checkbox", "resource_uri": "/api/public/tag/3830/", "snipts": "/api/public/snipt/?tag=3830"}, {"absolute_url": "/public/tag/select-all/", "id": 26178, "name": "select all", "resource_uri": "/api/public/tag/26178/", "snipts": "/api/public/snipt/?tag=26178"}], "title": "Checkbox with Select All Function - Javascript + Html", "user": {"absolute_url": "/KadeJM/", "email_md5": "a95845b8f17cfeb12451b23a2e1f31f3", "id": 23002, "resource_uri": "/api/public/user/23002/", "snipts": "/api/public/snipt/?user=23002", "snipts_count": 10, "username": "KadeJM"}}