Phillip Schmidt
Phillip Schmidt

Reputation: 8818

Telerik Chart not displaying correctly in IE

I have an interesting problem. I have a page containing a Telerik chart which also has a "Printer friendly version" type function, which opens a new window with some of the html from the first page. Because of some formatting issues, the printer-friendly version function goes through a different view than the original view.

Here are some points that might be helpful:

  1. I am using HTML 4.01 Strict
  2. I am using IE 8
  3. The exact same code is called for a telerik GRID, and interestingly enough it renders just fine.

The way it works is like this:

  1. The original page gets rendered (through OriginalPage.aspx) -- chart displays just fine
  2. The html for the div containing the chart is grabbed and saved
  3. PrinterFriendly.aspx is called (this page only contains the chart div, some js, and some html for nested tables (yeah, i know, doing a layout with tables is bad, but I didn't code the UI)
  4. A new window is opened with the result of PrinterFriendly.aspx
  5. The html for the div from the first render is injected into the new page html
  6. Page is rendered -- chart doesn't display at all in IE (works fine in chrome and FF)

I'm thinking this is because IE is pretty strict about HTML validation, and doesn't allow certain elements inside certain other ones. But the problem here is the telerik chart. Any idea what this could be?

Upvotes: 0

Views: 1050

Answers (1)

j0aqu1n
j0aqu1n

Reputation: 1021

From IE 8 run Developer tools by pressing F12. In there you can change the "Document Mode" to IE8. It could be that your page is opening in IE7 standards mode or Quirks mode. You should set the document mode for your pages by setting the DOCTYPE tag. I am not familiar with Telerik controls, but these kinds of controls typically work on specific modes, like HTML 5, for example.

Upvotes: 1

Related Questions