JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Checkboxes

We all know what checkboxes are—those square controls that toggle a checkmark when clicked and that can display caption text. For example, you can see checkboxes in the CheckBoxes example on the CD-ROM, as shown in Figure 16.1. This example is intended to help the user design a sandwich, and as you can see in that figure, they've chosen whole wheat bread, sausage, and so on. Checkboxes like these are good for specifying non-exclusive options; that is, a single sandwich can have not only whole wheat bread, but also sesame seeds so, unlike radio buttons, the checkboxes in Figure 16.1 will stay checked when you check and uncheck other checkboxes.

Click To expand
Figure 16.1: The CheckBoxes example.

Web server checkboxes look and act very much like the ones you'll see in Windows forms, but of course there are many differences. Web server checkboxes cannot be made three-state, they do not have a Select method, they do not have Show or Hide methods, you need to set their AutoPostBack property to True if you want to handle their events when they happen, and there are many other differences as well.

In fact, only the two checkboxes at left in Figure 16.1 are standalone checkboxes—the other checkboxes you see are part of a checkbox list.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor