2

So I have my slider module up and running but Internet Explorer 11 is not responding to the fullscreen button. Firefox and Chrome are working just fine. I found this code on Stack but still no difference. Any thoughts?

function toggleFullScreen() {
  if (!document.fullscreenElement &&    // alternative standard method
      !document.mozFullScreenElement && !document.webkitFullscreenElement) {  // current working methods
    if (document.documentElement.requestFullscreen) {
      document.documentElement.requestFullscreen();
    } else if (document.documentElement.mozRequestFullScreen) {
      document.documentElement.mozRequestFullScreen();
    } else if (document.documentElement.webkitRequestFullscreen) {
      document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
    } else if (elem.msRequestFullscreen) {
            elem.msRequestFullscreen();
    }


  } else {
    if (document.cancelFullScreen) {
      document.cancelFullScreen();
    } else if (document.mozCancelFullScreen) {
      document.mozCancelFullScreen();
    } else if (document.webkitCancelFullScreen) {
      document.webkitCancelFullScreen();
    } else if (document.msExitFullscreen) {
            document.msExitFullscreen();
        }
  }
}

 </script>

Sorry if this question has been answered. I haven't found the solution.

dnp76
  • 119
  • 1
  • 6

1 Answers1

2

According to this site the fullscreen API is not supported in IE. There seem to be no information on whether this is something that will be supported by IE11 either.

According to MDN's article on fullscreen it seems that this technique is still be very much experimental for most browsers.

You could also try this

Internet Explorer full screen mode?

Set window to fullscreen (REAL fullscreen; F11 functionality) by javascript

<script type="text/javascript">
    function max() {
        var wscript = new ActiveXObject("Wscript.shell");
        wscript.SendKeys("{F11}");
    }
</script>

if you really want to have the full screen in internet explorer.... Try giving the slider wiidth and height 100% in jquery.

Community
  • 1
  • 1
Wim Pruiksma
  • 582
  • 4
  • 19
  • @dnp76 No problem mate – Wim Pruiksma Nov 16 '15 at 11:43
  • Well, it seems I missed something. The function works as long as the slider is self-standing. Unfortunately, the client has the slider inside an iframe of their WP page. So now when we click F11 on IE11, the WP page also goes full screen. This is not the case with Firefox or Chrome. I'm definitely going to need a work around for this iFrame. – dnp76 Nov 16 '15 at 12:25
  • Remove the iframe. Iframes aren't used anymore – Wim Pruiksma Nov 16 '15 at 13:44
  • Not sure of any other way to get this html site... alloytoy.rheinfelden-alloys.eu ... to display on this wp site... rheinfelden-alloys.eu without the use of an iframe or widget. – dnp76 Nov 17 '15 at 11:40
  • You want to get the html of another webpage? You could use jquery to to that – Wim Pruiksma Nov 17 '15 at 13:39