This is a migrated thread and some comments may be shown as answers.

Change background color client-side

3 Answers 159 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
apb
Top achievements
Rank 1
apb asked on 20 Mar 2010, 12:43 AM
Hi,

How do I change background color client-side?  I've wasted hours trying to get this thing to like a normal control.

I'm trying to use a color picker and client-side javascript to change the page background and this thing is the only control that won't change.

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Mar 2010, 01:34 PM
Hi Al,

Please, use the following demos for reference and let us know if you have further questions:

http://demos.telerik.com/aspnet-ajax/colorpicker/examples/clientsideapi/defaultcs.aspx

http://demos.telerik.com/aspnet-ajax/colorpicker/examples/clientsideevents/defaultcs.aspx


Greetings,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
apb
Top achievements
Rank 1
answered on 23 Mar 2010, 01:41 PM
Thanks for your reply.

Perhaps my question was not clear -- I know how to use the color picker client-side. 

What I cannot figure out is how to change the background color of the TOOLBAR. I can change pretty much everyting else on my page with javascript except the the toolbar.
0
Peter
Telerik team
answered on 26 Mar 2010, 01:32 PM
Hello apb,

Please, try the following:

<script type="text/javascript">
     function changeBGofTlbr() 
     {
         $telerik.$(".rtbMiddle").css("background", "red");
     }
 </script>
 <telerik:RadToolBar ID="RadToolBar1" runat="server">
     <Items>
         <telerik:RadToolBarButton runat="server" Text="Button 0">
         </telerik:RadToolBarButton>
         <telerik:RadToolBarButton runat="server" Text="Button 1">
         </telerik:RadToolBarButton>
         <telerik:RadToolBarButton runat="server" Text="Button 2">
         </telerik:RadToolBarButton>
     </Items>
 </telerik:RadToolBar>
 <br />
 <input id="Button1" type="button" value="change background of tooltbar" onclick="changeBGofTlbr()" />



Kind regards,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ToolBar
Asked by
apb
Top achievements
Rank 1
Answers by
Peter
Telerik team
apb
Top achievements
Rank 1
Share this question
or