{"id":7061,"date":"2014-05-19T04:11:08","date_gmt":"2014-05-19T04:11:08","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/19\/javascript-open-page-element-in-fullscreen-html5-fails-in-internet-explorer-collection-of-common-programming-errors\/"},"modified":"2014-05-19T04:11:08","modified_gmt":"2014-05-19T04:11:08","slug":"javascript-open-page-element-in-fullscreen-html5-fails-in-internet-explorer-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/19\/javascript-open-page-element-in-fullscreen-html5-fails-in-internet-explorer-collection-of-common-programming-errors\/","title":{"rendered":"javascript open (page element) in fullscreen HTML5 fails in Internet Explorer-Collection of common programming errors"},"content":{"rendered":"<p>Hi I have a web page that I want to open a div element (with an ID) and its contents from the existing page into fullscreen. It works fine in FF and Chrome but does not work in IE10 or IE11. I get no errors in the console log.<\/p>\n<p>I used a similar methodology to this online example I found which also does not work for me in IE: http:\/\/davidwalsh.name\/demo\/fullscreen.php. Is there a setting in IE that needs to be enabled to display fullscreen? F11 works fine for me. I thought there might be a security setting?<\/p>\n<p>I am using the code as defined within MS own documentation: http:\/\/msdn.microsoft.com\/en-us\/library\/ie\/dn254939(v=vs.85).aspx<\/p>\n<pre><code>function requestFullScreen(element) {\n           \/\/ Supports most browsers and their versions.\n       var requestMethod = element.requestFullScreen || \n                            element.webkitRequestFullScreen || \n                            element.mozRequestFullScreen || \n                            element.msRequestFullScreen;\n\n        console.log(\"element.msRequestFullScreen\" + element.msRequestFullScreen);\n\n        if (requestMethod) { \/\/ Native full screen.\n\n            requestMethod.call(element);\n        } else if (typeof window.ActiveXObject !== \"undefined\") { \/\/ Older IE.\n            var wscript = new ActiveXObject(\"WScript.Shell\");\n            if (wscript !== null) {\n                wscript.SendKeys(\"{F11}\");\n            }\n        }\n    }\n\n  $(\".fullscreen\").live('click',function(event) {\n\n\n     var elem = document.getElementById(\"fulltextview\"); \/\/ Make the fulltext    \n   view elements contents go full screen.\n  requestFullScreen(elem);\n});\n<\/code><\/pre>\n<p>In this example the variable requestMethod is always undefined.<br \/>\nIs it because IE is not detecting the onclick event and therefore blocking the request due to security concerns? More help needed. (yes, I am forced to use an old version of jQuery 1.4.4)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi I have a web page that I want to open a div element (with an ID) and its contents from the existing page into fullscreen. It works fine in FF and Chrome but does not work in IE10 or IE11. I get no errors in the console log. I used a similar methodology to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7061","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7061"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7061\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}