This is a migrated thread and some comments may be shown as answers.
'styleSheet' is null or not an object
4 Answers 43 Views
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 2
Kevin asked on 25 Mar 2009, 04:01 PM
Trying to get things working regarding skins and moving from Q3 2008 to Q1 2009 version.  I have read the other posts and have submitted a ticket to get some help converting a custom skin.

But while waiting on that, we are getting the following error on pages.  Anyone else seen?

When page loads, javascript error is:
'styleSheet' is null or not an object

Can't tell for sure where it's coming from.

Anyone else seeing this?

4 Answers, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 27 Mar 2009, 04:25 AM
Hello Kevin-

I have not seen that error in any of the sites I've upgraded to Q1. Can you provide a few more details about your scenario? Specifically, if you can let me know which browser you're using, which RadControls you're using on your page, and which skin(s), I'll try to double-check on my side. Also, do you have any custom JavaScript on this page? It's possible that an error is occuring somewhere else that is ultimately causing this error to surface and thus confusing the situation.

Let me know and I'll try to help.

-Todd
0
Peichung
Top achievements
Rank 1
answered on 08 Apr 2009, 08:15 PM
I've got the same error when I include converted 08 Q3 color picker skin in 09 Q1:

<

link href="../Skins/WebBlue/ColorPicker.WebBlue.css" rel="stylesheet" type="text/css" />

 

0
Tervel
Telerik team
answered on 09 Apr 2009, 07:48 AM
Hello all,

The problem you are experiencing is most likely related to two factors combined:
1. You are using RadFormDecorator on your page
2. And you have imported too many CSS files. IE has a limit of 32 CSS files as explained here:
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/ad1b6e88-bbfa-4cc4-9e95-3889b82a7c1d/

The error occurs because RadFormDecorator tries to create dynamically one more stylesheet, which fails, because of the limitation.

The best thing to do would be to reexamine your CSS links and eliminate links to controls that are not acutally used on the page. Another option would be to simply combine several CSS files into one (for example, you might try adding the base and the skin-specific CSS files together).


On a side note, if you download and use the current Q1 2009 SP1 you will not experience a javascript error (there is an extra check that avoids it). However, since the 32 CSS files limit still exists no CSS file beyond file #32 will be processed by the browser.


All the best,
Tervel
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Peichung
Top achievements
Rank 1
answered on 09 Apr 2009, 12:39 PM
Hi Tervel,

That's certainly our case.  Thanks for the reply.

Peichung
Asked by
Kevin
Top achievements
Rank 2
Answers by
Todd Anglin
Top achievements
Rank 2
Peichung
Top achievements
Rank 1
Tervel
Telerik team
Share this question
or