Glossary Item Box
GalleryBox has next client side events:
| Client-side event | Description | ||||||||||||||||||
| OnClientClick | Occurs when the user clicks the control's Browse button. If the user clicks the left mouse button, the onClick event for an object occurs only if the mouse pointer is over the object and an onMouseDown and an onMouseUp event occur in that order. For example, if the user clicks the mouse on the object but moves the mouse pointer away from the object before releasing, no onClick event occurs. | ||||||||||||||||||
| OnGalleryClose |
Occurs when the user closed the Media Gallery. All MediaGallery parameters - file name, width, height, etc. are send to this function as arguments. The following args properties provide information specific to this event.
|
Also GalleryBox has some client-side API functions to easily manipulate with control and its value without postback.
Client-side API functions list:
| Function name | Description |
| al_GalleryBox_SetEnable(clientID, isEnable) | Enables or disables the control with given identifier clientID, new state sets with isEnable value |
| al_GalleryBox_IsEnabled(clientID) | Returns is the control enabled or not |
| al_GalleryBox_SetVisible(clientID, isVisible) | Shows or hides the control with identifier clientID, new state depends on isVisible value |
| al_GalleryBox_IsVisible(clientID) | Returns is the control visible or not |
| al_GalleryBox_SetValue(clientID, path) | Sets the control's path |
| al_GalleryBox_GetValue(clientID) | Gets the control's path |
Example:
<cc1:GalleryBox ID="GalleryBox1" runat="server"></cc1:GalleryBox>
<input id="btn1" onclick="al_GalleryBox_SetEnable('GalleryBox1', false);" type="button" value="Disable GalleryBox" />
<input id="btn2" onclick="al_GalleryBox_SetEnable('GalleryBox1', true);" type="button" value="Enable GalleryBox" />
<input id="btn2" onclick="al_GalleryBox_SetVisible('GalleryBox1', true);" type="button" value="Show GalleryBox" />
<input id="btn2" onclick="al_GalleryBox_SetVisible('GalleryBox1', false);" type="button" value="Hide GalleryBox" />
<input id="btn2" onclick="al_GalleryBox_SetValue('GalleryBox1', 'someimage.jpg');" type="button" value="Set GalleryBox value to 'someimage.jpg'" />
<input id="btn2" onclick="alert(al_GalleryBox_GetValue('GalleryBox1'));" type="button" value="Get GalleryBox color" />
| See Also |
Controls: GalleryBox
Overview: Overview