numero = 19271
interpreted = N
texte = >Having two s of the same type and the same name is asking for >trouble. What if you remove the second one, NAME=theField VALUE=0> ?Well, the whole point of this thread was that there is no way to make checkboxes work properly without some sort of trick. Including the second line is the trick that we have found to work out pretty well.The problem with HTML checkboxes is that if they are selected the form contains the named field and value, but if they are unchecked NOTHING is sent by the browser. It is really stupid, and I would like to know who was the idiot that defined checkboxes like that...I believe that checkboxes should have been defined like this:and the browser would send the ON or OFF Value, depending on whether it was checked or not.One note of caution, the trick of including the second hidden field only works, because all browsers (so far) send the form fields in the same order as they are shown on screen, and because WebCatalog returns the first value found. If any future browser changes the order of the fields, the trick will break.If anyone else has a better way to use checkboxes, please let us know...Charles_______________________________________________________________Institut Balear de Comunicacions, S.L.Gremio Tejedores 22, 107009 Palma de Mallorca, Spain_____________________________________________Tel: +34 971.43.12.77Fax: +34 971.43.08.18 E-mail: ckefauver@ibacom.esURL: http://www.ibacom.es/_____________________________________________Public PGP signature (Clave publica PGP):http://www.ibacom.es/PGP/kefauver.txt_______________________________________________________________
Associated Messages, from the most recent to the oldest:
>Having two s of the same type and the same name is asking for >trouble. What if you remove the second one, NAME=theField VALUE=0> ?Well, the whole point of this thread was that there is no way to make checkboxes work properly without some sort of trick. Including the second line is the trick that we have found to work out pretty well.The problem with HTML checkboxes is that if they are selected the form contains the named field and value, but if they are unchecked NOTHING is sent by the browser. It is really stupid, and I would like to know who was the idiot that defined checkboxes like that...I believe that checkboxes should have been defined like this:and the browser would send the ON or OFF Value, depending on whether it was checked or not.One note of caution, the trick of including the second hidden field only works, because all browsers (so far) send the form fields in the same order as they are shown on screen, and because WebCatalog returns the first value found. If any future browser changes the order of the fields, the trick will break.If anyone else has a better way to use checkboxes, please let us know...Charles_______________________________________________________________Institut Balear de Comunicacions, S.L.Gremio Tejedores 22, 107009 Palma de Mallorca, Spain_____________________________________________Tel: +34 971.43.12.77Fax: +34 971.43.08.18 E-mail: ckefauver@ibacom.esURL: http://www.ibacom.es/_____________________________________________Public PGP signature (Clave publica PGP):http://www.ibacom.es/PGP/kefauver.txt_______________________________________________________________
Charles Kefauver
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...