0

one of the custom datatable view needs IE 8 standard view to render it on web browser, i have to <meta http-equiv="X-UA-Compatible" content="IE=7; IE=8" /> insert this piece of code in my site.master to make it work.

But this will override my whole site compatibility settings. is there a way to insert this in my application head section at run time & that too on launching control i would like to add this meta tag to my HTML page.

iCollect.it Ltd
  • 92,391
  • 25
  • 181
  • 202
Naruto
  • 9,476
  • 37
  • 118
  • 201
  • go for ie comments hack syntax. – Jai Mar 24 '14 at 12:02
  • possible duplicate of [How to insert metatag without using jquery append?](http://stackoverflow.com/questions/7711411/how-to-insert-metatag-without-using-jquery-append) – Liam Mar 24 '14 at 12:07
  • Or [How to add meta tag in javascript](http://stackoverflow.com/questions/18982228/how-to-add-meta-tag-in-javascript) – Liam Mar 24 '14 at 12:07
  • Or [Adding using javascript](http://stackoverflow.com/questions/16960540/adding-meta-http-equiv-x-ua-compatible-content-ie-9-using-javascript) – Liam Mar 24 '14 at 12:08
  • Or [Adding a meta tag via jquery?](http://stackoverflow.com/questions/7063863/adding-a-meta-tag-via-jquery) – Liam Mar 24 '14 at 12:08
  • 1
    See what I'm saying here? Google would of answered this in about 5 seconds. – Liam Mar 24 '14 at 12:09
  • If your datatable control needs IE8 mode, then I'd say you need to fix your datatable control so it works properly in modern IE versions, rather than trying to use the browser mode to foce it to work. You can't mix and match the browser mode: if one part of your page is in IE8 mode, then the whole page must be. That means you're going to be stuck with your entire site in IE8 mode forever until you can fix this control. Not a good place to be. – Spudley Mar 24 '14 at 13:29
  • Hi, i tried many ways , i.e var metaTag = document.createElement("meta"); metaTag.httpEquiv = 'X-UA-Compatible'; metaTag.content = 'IE=7; IE=8'; metaTag.id = 'id_metaTag'; (document.head || document.documentElement).appendChild(metaTag); still no luck :( – Naruto Mar 24 '14 at 14:14

0 Answers0