English 中文(简体)
XmlHttp Request status 0, localhost issues (javascript, ajax, php) help
原标题:XmlHttp Request status 0, localhost issues (javascript, ajax, php) help

我正在使用Xampp测试我的代码。 我使用梦想的活着观。 实在在,并交还一个Xmlhttp.status代码200和对应产出。 但是,当我试图在独立实体或论坛中看到这一点时,地位法是零,没有产出。 我读到,这似乎与《URL》(绝对/相对性?)有关, 我尝试了多种URL格式,但似乎无法做到这一点。

基本上,我有一份“html”文件,称“结果”职能要求执行试验3.php档案。

档案的存放地点是C://xampp/htdocs/test/ha/test3.php。

I test file http://C://xampp/htdocs/test/ha/test3.php 或C://xampp/htdocs/test/ha/test3.php 或文档:http://xampp/htdocs/test/ha/test3.phpPleases a URL Format (the full url).

我的法典如下,DW的行文中相对的旋律也是如此,但在与FF/IE浏览器独立接触时。

xmlhttp.open("GET","../ha/test3.php",true);

我应该用什么来取代这ur?

TIA

function Result() 
{


xmlhttp = ajaxFunction();
//document.getElementById("results").innerHTML += " ajax function got executed";

xmlhttp.onreadystatechange=function()
  {

  document.getElementById("results").innerHTML += xmlhttp.readyState; //readystate check/debug
  document.getElementById("results").innerHTML += xmlhttp.status; //status check/debug

   if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
      document.getElementById("results").innerHTML += "onreadystate";  //readystate check/debug

      document.getElementById("results").innerHTML += xmlhttp.responseText;



    }

    }
  }//onreadystate bracket



xmlhttp.open("GET","../ha/test3.php",true);

xmlhttp.send();

} //result function bracket
问题回答




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签