none
Ajax no works in Explorer 11 ?

    Question

  • Ajax scripts no works in Explorer 11 ?

    I use a simple refresh ajax script,  works  in all browsers, and working in the explorer 10.

    But not work in Explorer 11 ! why not ?   Ridiculous !!!

    Look ajax simple script:

    <script type="text/javascript">
    
    function reqGet(file, pars, bg, after) {
        var http = new XMLHttpRequest();
        http.open("GET", file + ".php?" + pars, bg);
        if (bg) {
            http.onreadystatechange = function() {
                if (http.readyState == 4) {
                    fter(http.responseText);
                }
            };
        }
        http.send(null);
        if (!bg)
            return after(http.responseText);
    }
    
    function ret (a) {
     return a;
    }
    
    var title = "<?php echo $title;?>";
    
    
    if(title == "true"){
    
    window.setTimeout(getNewTitel, 100)
    window.setInterval(getNewTitel, 10000);
    
    } else {
        
    }
    
    
    
    function getNewTitel() {
     document.getElementById("playing").innerHTML = reqGet("<?php echo JURI::base() . 'modules/test/tmpl/' ?><?php switch ($params->get("quantity"))
    {
        case 'list'; echo $urla; break; case 'list2'; echo $urlb; break; case 'list3'; echo $urlicea; break; case 'list4'; echo $urliceb; break; default: echo $url ; } ?>", "host=" + encodeURIComponent("<?php echo $host; ?>") + "&port=<?php echo $port;?>" + "&password=<?php echo $password;?>", false, ret);
    }
    
    </script>




    • Edited by ultrabr Friday, September 16, 2016 4:50 AM more text
    Friday, September 16, 2016 4:45 AM

Answers