[Udpcast] Udpcast cast-o-matic
Stephane
steph2607 at tiscali.fr
Wed Sep 20 19:32:55 CEST 2006
Hi,
Le Mercredi 20 Septembre 2006 16:58, Stephane a écrit :
> Hi,
>
> A suggestion about: http://udpcast.linux.lu/cast-o-matic/
>
> Would it be possible to add javascript buttons to check/uncheck all
> drivers?
>
> Here is my proposition:
> ===============================
> <script type="text/javascript">
> function checkAll(){
> champs_input=document.getElementsByTagName('input');
> for(i=0;i<champs_input.length;i++){
> type=champs_input[i].getAttribute('type');
The following line isn't usefull...
> name=champs_input[i].getAttribute('name');
... I put it when I was testing my script...
> if(type=="checkbox"){
> champs_input[i].checked=true;
> }
> }
> }
> function UncheckAll(){
> champs_input=document.getElementsByTagName('input');
> for(i=0;i<champs_input.length;i++){
> type=champs_input[i].getAttribute('type');
Idem:
> name=champs_input[i].getAttribute('name');
> if(type=="checkbox"){
> champs_input[i].checked=false;
> }
> }
> }
> </script>
> ===============================
>
> An to test:
> ===============================
> <p><a href="javascript: checkAll();">Check All</a> / <a href="javascript:
> UncheckAll();">Uncheck All</a></p>
> ===============================
>
> Thank you very much!
Thanks!
--
Stéphane.
More information about the Udpcast
mailing list