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

<html> classes get overwritten

5 Answers 63 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Bob Hanson
Top achievements
Rank 1
Bob Hanson asked on 21 Mar 2011, 05:09 PM
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

5 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 24 Mar 2011, 04:29 PM
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
0
Bob Hanson
Top achievements
Rank 1
answered on 24 Mar 2011, 06:03 PM
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
0
Simon
Telerik team
answered on 28 Mar 2011, 04:56 PM
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
0
Bob Hanson
Top achievements
Rank 1
answered on 28 Mar 2011, 05:48 PM
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?

0
Niko
Telerik team
answered on 29 Mar 2011, 04:47 PM
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
Tags
ScriptManager and StyleSheetManager
Asked by
Bob Hanson
Top achievements
Rank 1
Answers by
Simon
Telerik team
Bob Hanson
Top achievements
Rank 1
Niko
Telerik team
Share this question
or