<html> classes get overwritten

6 posts, 0 answers
  1. Bob Hanson
    Bob Hanson avatar
    3 posts
    Member since:
    Aug 2009

    Posted 21 Mar 2011 Link to this post

    Hello,

    Im trying to use modernizr.js in my application. It attaches classes to the <html> tag. When the page loads Telerik wipes out those classes and adds its own.

    How do i prevent this? is there an option to append the classes without overwriting the ones im setting?

    please advise.

    Thank you
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 24 Mar 2011 Link to this post

    Hello Bob Hanson,

    Our base code only appends to the documentElement class names list, it does not wipe out anything that has been already there. Perhaps some specific control does that.

    Do you have a RadFormDecorator on the page? What types of RadControls are there in general?

    Regards,
    Simon
    the Telerik team
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bob Hanson
    Bob Hanson avatar
    3 posts
    Member since:
    Aug 2009

    Posted 24 Mar 2011 Link to this post

    I have    
    <telerik:RadFormDecorator/>

                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
    <telerik:RadStyleSheetManager>

    <telerik:RadMenu>
    <telerik:RadWindow>
    <telerik:RadWindowManager>

    If i take out all the telerik stuff my scripts get loaded into the html tag correctly.

    when i add the telerik stuff all my classes in the html tag do not show up and this is what i get

    <html lang="en" class="RadForm RadForm_Nucleus rfdButton rfdScrollBars rfdRadio rfdCheckbox">

    which leads me to believe that the Telerik scripts that get injected at run time into the bottom of the head dont append, but replace the existing classes that get set.

    unless im missing something.

    please advise

    Thank you

    Bob
  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 28 Mar 2011 Link to this post

    Hi Bob Hanson,

    Thank you for the additional info.

    In this situation, it is highly possible that the RadFormDecorator on the page replaces the class names list. Can you please verify this by removing *only* the RFD from the page and seeing whether it resolves the problem?

    All the best,
    Simon
    the Telerik team
  6. Bob Hanson
    Bob Hanson avatar
    3 posts
    Member since:
    Aug 2009

    Posted 28 Mar 2011 Link to this post

    Yes, this is the case. If I remove only the RFD then i get the desired behavior.

    so the next quesiton is how to i get them to not be overwritten?

    what exactly does the RFD do? Do i need it?

  7. Niko
    Admin
    Niko avatar
    387 posts

    Posted 29 Mar 2011 Link to this post

    Hello Bob,

    You can escape the overwriting scenario and still get the RadFormDecorator to decorate. All you need to do is define a DecorationZoneID for the decorator and make sure that all the controls that need decoration are within this zone. If that is the whole page you can set the DecoratedZoneID to the id of the form.

    Hope this will solve your issue.

    Greetings,
    Niko
    the Telerik team
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017