How to send an F11 in an open page in IE8.0

0

I have a problem, the company I work with uses IE 8.0 browser in windows XP, I have a code that sends an F11 command in javascript works on any browser but in that specific does not run you have any suggestions for me I am doing to run the code below in IE 8.0

function requestFullScreen() {


    var el = document.body;
    //alert(el);
    // Supports most browsers and their versions.
    var requestMethod = el.requestFullScreen || el.webkitRequestFullScreen  || el.mozRequestFullScreen || el.msRequestFullScreen;
    //alert(requestMethod);
    if(requestMethod) {
    alert("TESTE1");
    // Native full screen.
    requestMethod.call(el);

    }else if (typeof window.ActiveXObject == "undefined"){
        //alert("TESTE2");
        // Older IE.
        var wscript = new ActiveXObject("WScript.Shell");

        if(wscript !== null) {
            x = window.innerWidth
            y = window.innerHeight;
            alert(x+' - '+y);
            if(y == 916){
                wscript.SendKeys("{F11}");
            }else if(y == 1005){
                wscript.SendKeys("{F11}");
            }else{

            }


        }
    }
}
    
asked by anonymous 16.07.2018 / 18:42

0 answers