AJAX正在开发一台计算机而不是另一台计算机

时间:2012-08-16 18:21:36

标签: ajax

好的,我在高尔夫俱乐部工作,当你改变俱乐部的状况时,它应该用AJAX改变价格。它适用于我的计算机和Firefox版本(14.0.1),但它只是将我兄弟的计算机和Firefox版本(14.0.1)的价格改为0.00美元。一旦它改为0.00美元,它就不会再在他的电脑上改变了。我们在Firefox上只遇到过这个问题。有谁知道为什么会这样做?

我当时认为它可能与XMLHttpRequest()有关,但它并不意味着它可以在一台计算机上运行而不是另一台计算机,而它与浏览器的版本相同。

这是Javascript文件。

var xmlHttp

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function quantityPrice(ClubType, Make, Model, ShaftType, Condition, Qty)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Sorry, your browser does not support this website. Your browser needs to be upgraded to newer version.");
  return;
  } 
var url="includes/getPriceViaQuantity.php";
url=url+"?ClubType="+ClubType;
url=url+"&Make="+Make;
url=url+"&Model="+Model;
url=url+"&ShaftType="+ShaftType;
url=url+"&Condition="+Condition;
url=url+"&Qty="+Qty;
xmlHttp.onreadystatechange=quantityChangePrice;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}


function quantityChangePrice() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("quote").innerHTML=xmlHttp.responseText;

}
}

function ironsetPrice(ClubType, Make, Model, ShaftType, Condition, Qty, MakeUp)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Sorry, your browser does not support this website. Your browser needs to be upgraded to newer version.");
  return;
  } 
var url="includes/getPriceViaMakeUp.php";
url=url+"?ClubType="+ClubType;
url=url+"&Make="+Make;
url=url+"&Model="+Model;
url=url+"&ShaftType="+ShaftType;
url=url+"&Condition="+Condition;
url=url+"&Qty="+Qty;
url=url+"&MakeUp="+MakeUp;
xmlHttp.onreadystatechange=ironsetChangePrice;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}


function ironsetChangePrice() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("quote").innerHTML=xmlHttp.responseText;

}
}

0 个答案:

没有答案
相关问题