Glossary Item Box
Checkbox has some client-side API events and functions to manipulate with control and its value without postback.
Client side events list:
| Client-side event | Description |
| onChange | Occurs when checkbox status is changed. |
| onClick | Occurs when checkbox status is about to be changed |
Client-side API functions list:
| Function name | Description |
| al_Checkbox_SetEnable(clientID, isEnable) | Enables or disables the control with given identifier clientID, new state sets with isEnable value |
| al_Checkbox_IsEnabled(clientID) | Returns is the control enabled or not |
| al_Checkbox_SetVisible(ctrlID, visible) | Shows or hides the control with identifier clientID, new state depends on visible value |
| al_Checkbox_IsVisible(clientID) | Returns is the control visible or not |
| al_Checkbox_SetValue(ctrlID, checked) | Sets the control's checked state to checked |
| al_Checkbox_GetValue(ctrlID) | Gets the control's checked value |
Example:
<cc1:Checkbox ID="Checkbox1" runat="server"></cc1:Checkbox>
<input id="btn1" onclick="al_Checkbox_SetEnable('Checkbox1', false);" type="button" value="Disable Checkbox" />
<input id="btn2" onclick="al_Checkbox_SetEnable('Checkbox1', true);" type="button" value="Enable Checkbox" />
<input id="btn2" onclick="al_Checkbox_SetVisible('Checkbox1', true);" type="button" value="Show Checkbox" />
<input id="btn2" onclick="al_Checkbox_SetVisible('Checkbox1', false);" type="button" value="Hide Checkbox" />
<input id="btn2" onclick="al_Checkbox_SetValue('Checkbox1', true);" type="button" value="Set Checkbox value to 'checked'" />
<input id="btn2" onclick="al_Checkbox_SetValue('Checkbox1', false);" type="button" value="Set Checkbox value to 'unchecked'" />
<input id="btn2" onclick="alert(al_Checkbox_GetValue('Checkbox1'));" type="button" value="Get Checkbox color" />
| See Also |
Controls: Checkbox