Ajax function not working in IE8 For Face book apps

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
shafiq2626
Forum Commoner
Posts: 88
Joined: Wed Mar 04, 2009 1:54 am
Location: Lahore
Contact:

Ajax function not working in IE8 For Face book apps

Post by shafiq2626 »

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.

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>
Post Reply