|
||
| Inside Technique : Custom Checkboxes : Creating Checkboxes The custom checkbox is created using our Below we show how this function is used to create the demonstration on the first page:
There is a lot happening in the above form. When calling the newCheckbox function you must give it a unique ID. This ID represents the name used when the value is submitted. The form name must match the name of the form that contains the checkbox. We use this value to locate the input field that represents the click-state of the checkbox. The last two arguments were explained above and represent the initial click-state, and the label. To make this example completely cross-browser, we special-case older scriptable browsers by checking for image collection support. If the image collection is not supported (eg., Internet Explorer 3.0), we output standard checkboxes. For non-scriptable browsers, the NOSCRIPT element contains the standard checkboxes. On the last page you will find the code for the newCheckbox() and support functions and cross-browser scripting notes. Page 1:Custom Checkboxes © 1997-2000 InsideDHTML.com, LLC. All rights reserved. |