Hi
This is the code I use:
Now I want to make one checkbox which if selected, makes all users selected, and when deselected, makes all users deselect.
I searched with google, but I havent find anything yet.
Does somebody know the javascript code?
Thx in advance
edit:
document.writenew.userlist
document.formname.selectmenuname
This is the code I use:
| Code: |
| <select multiply size="10">
<option value=1>User 1</option> <option value=2>User 2</option> </select> |
Now I want to make one checkbox which if selected, makes all users selected, and when deselected, makes all users deselect.
I searched with google, but I havent find anything yet.
Does somebody know the javascript code?
Thx in advance
edit:
| Code: |
| <script type="text/javascript">
function selAll(_v) { for(var i=1;i<document.writenew.userlist.length;i++) document.writenew.userlist [i].selected=_v; } </script> <input type=\"button\" value=\"All\" onclick=\"selAll(true)\" /> <input type=\"button\" value=\"None\" onclick=\"selAll(false)\"> |
document.writenew.userlist
document.formname.selectmenuname
