File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 22
33Uses jQuery & JavaScript to select the opposite of any checkboxes that are currently selected
44
5+ No CSS just to make things easier to understand
6+ Possible improvements could be styling the buttons
7+
58###Tutorial Sources
69I cobbled together my own ` invert() ` function based on various sources. All of which I found to not meet my standards or were too complex
710
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ function invert(nameToInvert){
5959 ?>
6060
6161 <form method="post" action='php.php'>
62+ <p>Checkboxes</p>
6263 <input type='checkbox' name='chkBoxes[]' value='1'>
6364 <input type='checkbox' name='chkBoxes[]' value='2'>
6465 <input type='checkbox' name='chkBoxes[]' value='3'>
@@ -68,7 +69,13 @@ function invert(nameToInvert){
6869 <input type="button" name="btnAll" onclick="selectAll('chkBoxes[]')" value="All">
6970 <input type="button" name="btnNone" onclick="selectNone('chkBoxes[]')" value="None">
7071 <input type="button" name="btnInvert" onclick="invert('chkBoxes[]')" value="Invert">
71-
72+
73+
74+ <p>Radio Buttons</p>
75+ <input type='radio' name='radRadios' value='1'>
76+ <input type='radio' name='radRadios' value='2'>
77+ <input type="button" name="btnNone" onclick="selectNone('radRadios')" value="None">
78+
7279 <br>
7380 <input type="submit" value='Submit' name='btnSubmit'>
7481 </form>
You can’t perform that action at this time.
0 commit comments