PDA

View Full Version : سوال: مشکل در ajax با php



billgivz
سه شنبه 03 فروردین 1389, 09:54 صبح
سلام من با یک مشکل عجیب برخوردم من سایتم رو با ajax نوشتم وقتی در firefox 3.5 به بالا باز میکنم فقط progres bar
نشون میده ولی داخل IE و نسخه قبلی firefox این مشکل را ندارم .

mojtabadj
یک شنبه 08 فروردین 1389, 09:49 صبح
سلام من با یک مشکل عجیب برخوردم من سایتم رو با ajax نوشتم وقتی در firefox 3.5 به بالا باز میکنم فقط progres bar
نشون میده ولی داخل IE و نسخه قبلی firefox این مشکل را ندارم .

احتمالا تو اتصال مشکل داری از این کد استفاده کن




function MakeConnection()
{
var httpRequest;
if (window.XMLHttpRequest) // Mozilla, Safari, Opera
{
httpRequest = new XMLHttpRequest();
if (httpRequest.overrideMimeType)
{
httpRequest.overrideMimeType('text/html');
}
}
else if (window.ActiveXObject) // IE
{
try { httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e)
{
try { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) {}
}
}
if (!httpRequest)
{
alert('ERROR : Cannot create an XMLHTTP instance!');
return false;
}
return httpRequest;
}