Java script XMLHttpRequest

My code is not working when I uploaded it to the hosting site but it is 100% working in localhost. What’s wrong with my code?

var questionno="1";
load_questions(questionno);

function load_questions(questionno)
{
    document.getElementById("current_que").innerHTML=questionno;
    var xmlhttp=new XMLHttpRequest();
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            
            if(xmlhttp.responseText=="over")
            {
                window.location="result.php";
            }
            else
            {
                document.getElementById("load_questions").innerHTML=xmlhttp.responseText;
                load_total_que(); 
            }
        }
    };
    xmlhttp.open("GET","load_questions.php?questionno="+ questionno,true);
    xmlhttp.send(null);
}