Coming from Russia, please excuse any mistakes in my English.
I am trying to dynamically load the main page of my website using JavaScript, and I have written this script:
<script type="text/javascript">
function httpGet(theUrl) {
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send(null);
return xmlHttp.responseText;
}
alert(httpGet('http://site.ru'));
</script>
The script is located at site.ru/page123.
It works correctly in Firefox and successfully alerts the main page, but when running it in Opera, nothing seems to happen. Please help me fix this code as I cannot identify any errors. Thank you in advance.