| |
Change my parent's background color
    
| | |
This example demonstrates ColorPicker use without TargetId property..
Example code
<%@ Register TagPrefix="obout" Namespace="OboutInc.ColorPicker" Assembly="obout_ColorPicker" %> ...
<script type="text/JavaScript">
function OnColorOpen(sender){
var parent =sender.getPickerElement().parentNode;
sender.setColor(OboutInc.ColorPicker.getStyle(parent,"background-color"));
}
function OnColorPicked(sender){
var parent =sender.getPickerElement().parentNode;
parent.style.backgroundColor= sender.getColor();
}
</script>
<style type="text/css">
span.ColorPicker_Caller {border-width:1px; border-style:solid; border-color:#D0D0F8; background-color:#FFFFFF;}
span.ColorPicker_Caller:hover {border-color:#0000FF; background-color:#F0F0F8;}
</style>
... <obout:ColorPicker runat="server" OnClientOpen="OnColorOpen" OnClientPicked="OnColorPicked" > Change my parent's background color </obout:ColorPicker>
See the full source code in /ColorPicker/aspnet_withoutTargetId.aspx file of downloaded Suite.
| | |
| "Let me tell you that your products are good!" |
Gaurav |
|
| | |
|
|
|
|