Ajax function not working in IE8 For Face book apps
Posted: Tue Apr 05, 2011 6:53 am
Hi! to every one.
My face book apps is running successfully in fire fox and Chrome but creating problem in IE8.
Actually when i skip any question its working in Mozilla and Chrome but not in IE8.
Also Same problem with Drop new friends . application path is
http://apps.facebook.com/hello_champ/
And The function for Ajax are following.
My face book apps is running successfully in fire fox and Chrome but creating problem in IE8.
Actually when i skip any question its working in Mozilla and Chrome but not in IE8.
Also Same problem with Drop new friends . application path is
http://apps.facebook.com/hello_champ/
And The function for Ajax are following.
Code: Select all
<script type="text/javascript">
function showQuestion()
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("qdiv").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","questajax.php",true);
xmlhttp.send();
}
function showFriends()
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
//document.getElementById("frinddiv").innerHTML="";
document.getElementById("frinddiv").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","dropfriends.php",true);
xmlhttp.send();
}
</script>