Code:
<html>
<head>
<script type="text/javascript" src=ajax.js></script>
</script>
<style type='text/css'>
</style>
</head>
<body onload='makePOSTRequest("video_videos.php","display_details")'>
<div id='display_details'></div>
</body>
</html>
Code:
function makePOSTRequest(filename,id)
{
if (window.XMLHttpRequest) // Object of the current windows
{
xhr = new XMLHttpRequest();
}
else
if (window.ActiveXObject) // ActiveX version
{
xhr = new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer
}
xhr.onreadystatechange =function chk()
{alert(xhr.status);
if (xhr.readyState == 4){
if (xhr.status==200){
document.getElementById(id).innerHTML=xhr.responseText;
alert(xhr.responseText);
}
}
}
xhr.open('GET', filename, true);
xhr.send(null);
}
What does that mean?
Comment