locked
Javascript not working in IE10 RRS feed

  • Question

  • HtmlDivElement.document property is not available in IE10 whereas it is available in other versions of IE and other browsers. Is there any fix for this?

    Example:

    var div = document.getElementById('divId');
    var HtmlElement = div.document.documentElement;

    In IE10 div.document is undefined and the above line throws an error but it is working find in all other versions of IE and other browsers.

    Friday, April 26, 2013 8:12 AM

Answers

  • its a method of the document object. http://msdn.microsoft.com/en-us/library/aa752547(v=vs.85).aspx

    Rob^_^


    Questions regarding Internet Explorer 8, 9 and 10 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to raise a question, it's highly recommended you head on over to http://answers.microsoft.com/en-us
    Monday, April 29, 2013 9:08 PM

All replies

  • What about when you toggle the documentMode? Never heard of HTMLDivElemtent.document object.

    for questions about html, css and scripting for website developers using MSIE post to the IE Web Development forum with a link to your website...

    Regards.


    Rob^_^

    Saturday, April 27, 2013 1:28 AM
  • The same code works in other Browser modes (IE8, IE9 and IE10 compatibility) and Document modes
    Monday, April 29, 2013 10:38 AM
  • its a method of the document object. http://msdn.microsoft.com/en-us/library/aa752547(v=vs.85).aspx

    Rob^_^


    Questions regarding Internet Explorer 8, 9 and 10 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to raise a question, it's highly recommended you head on over to http://answers.microsoft.com/en-us
    Monday, April 29, 2013 9:08 PM