Change background color client-side

4 posts, 0 answers
  1. apb
    apb avatar
    46 posts
    Member since:
    Nov 2008

    Posted 19 Mar 2010 Link to this post

    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.

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 23 Mar 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. apb
    apb avatar
    46 posts
    Member since:
    Nov 2008

    Posted 23 Mar 2010 Link to this post

    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.
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 26 Mar 2010 Link to this post

    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.
Back to Top