久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='a6g5U'></bdo><ul id='a6g5U'></ul>

    <i id='a6g5U'><tr id='a6g5U'><dt id='a6g5U'><q id='a6g5U'><span id='a6g5U'><b id='a6g5U'><form id='a6g5U'><ins id='a6g5U'></ins><ul id='a6g5U'></ul><sub id='a6g5U'></sub></form><legend id='a6g5U'></legend><bdo id='a6g5U'><pre id='a6g5U'><center id='a6g5U'></center></pre></bdo></b><th id='a6g5U'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='a6g5U'><tfoot id='a6g5U'></tfoot><dl id='a6g5U'><fieldset id='a6g5U'></fieldset></dl></div>
  • <tfoot id='a6g5U'></tfoot>

      <legend id='a6g5U'><style id='a6g5U'><dir id='a6g5U'><q id='a6g5U'></q></dir></style></legend>

    1. <small id='a6g5U'></small><noframes id='a6g5U'>

        XMLHTTPRequest.status 在 FireFox 3.5 中返回 0 并且 resp

        XMLHTTPRequest.status returns 0 and responseText is blank in FireFox 3.5(XMLHTTPRequest.status 在 FireFox 3.5 中返回 0 并且 responseText 為空白)

          <small id='mxy96'></small><noframes id='mxy96'>

          <legend id='mxy96'><style id='mxy96'><dir id='mxy96'><q id='mxy96'></q></dir></style></legend>
          • <i id='mxy96'><tr id='mxy96'><dt id='mxy96'><q id='mxy96'><span id='mxy96'><b id='mxy96'><form id='mxy96'><ins id='mxy96'></ins><ul id='mxy96'></ul><sub id='mxy96'></sub></form><legend id='mxy96'></legend><bdo id='mxy96'><pre id='mxy96'><center id='mxy96'></center></pre></bdo></b><th id='mxy96'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mxy96'><tfoot id='mxy96'></tfoot><dl id='mxy96'><fieldset id='mxy96'></fieldset></dl></div>
              <tbody id='mxy96'></tbody>
              <tfoot id='mxy96'></tfoot>

                  <bdo id='mxy96'></bdo><ul id='mxy96'></ul>
                • 本文介紹了XMLHTTPRequest.status 在 FireFox 3.5 中返回 0 并且 responseText 為空白的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試訪問第三方 URL 以獲取 XML 響應并將響應顯示到我的網頁中.在 IE 和 Safari 瀏覽器中,我得到了狀態為 200 和 readystate 為 4 的正確響應.但在 FF3.5 和 Crome 中,我將 XMLHTTPRequest 狀態設為 0,而 reponseText 以空白字符串的形式出現.我嘗試了許多選項來編寫普通的 XMLHTTPRequest Ajax 代碼以及為此 ajax 請求使用 Prototype 1.5 版本的 js 文件,但 FF 3.5 中的狀態和響應文本仍然與 0 和空白字符串相同.

                  I am trying to hit a third party URL to get the XML response and to show the reposne into my webpage. I get a proper response with status as 200 and readystate as 4 in IE and Safari browsers. But In FF3.5 and Crome i get XMLHTTPRequest status as 0 and reponseText comes as a blank string. I tried many options writing the normal XMLHTTPRequest Ajax code as well as using Prototype 1.5 version js file for this ajax request, but still the status and reponseText in FF 3.5 remains the same as 0 and blank string.

                  任何幫助如何解決此問題或導致此問題的確切原因將不勝感激.我還嘗試在本地執行我的代碼以及部署到網絡服務器,但 FF 中的響應是相同的.

                  Any help how to resolve this issue or what exactly is causing this issue would be greatly appreciated. I had also tried to execute my code locally as well as deploying to webserver still the repsonse in FF is same.

                  下面是我的代碼片段

                  <script type="text/javascript" src="prototype_ajax.js"></script>
                  
                  <script type="text/javascript" language="javascript">
                  
                  new Ajax.Request("I place my URL Here", {
                      method: 'get',
                      onSuccess : function(transport){
                  
                         var resultDoc = transport.responseText;
                         var rootObj = loadXML(resultDoc);
                  
                      },
                      onFailure : function(transport){
                         alert(' On Failure '+transport)
                  
                      }
                  });
                  
                  function loadXML(xmlFile) {
                     var xmlDocElement =null;
                     var xmlDoc = null;
                  
                     if (window.ActiveXObject) {
                       try {
                          // code for IE
                          xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
                          xmlDoc.async=false;
                          xmlDoc.loadXML(xmlFile);
                       } catch (e) {
                          alert("inside catch::"+e.message);
                       }
                     } else {
                       // code for Mozilla, Firefox, Opera, etc.
                       parser=new DOMParser();
                       xmlDoc=parser.parseFromString(xmlFile,"text/xml");
                  
                       //xmlDocElement=xmlDoc.documentElement;
                     }
                  
                     //alert('loadXML value  '+xmlDoc)
                     return xmlDoc;
                  }
                  
                  </script>
                  

                  推薦答案

                  你好像碰到了 同源政策.您必須使用相對路徑,否則大多數瀏覽器只會返回一個空的 responseText.

                  It looks like you have bumped into the same origin policy. You have to use a relative path, otherwise most browsers will simply return an empty responseText.

                  以下 Stack Overflow 帖子可能也與您的問題有關:

                  The following Stack Overflow post is probably also related to your problem:

                  • XMLHttpRequest 中的空響應文本.

                  作為一種可能的解決方法,您可以設置一個非常簡單的反向代理(使用 mod_proxy 如果您使用的是 Apache).這將允許您在 AJAX 請求中使用相對路徑,而 HTTP 服務器將充當任何遠程"位置的代理.

                  As one possible workaround, you could set up a very simple reverse proxy (with mod_proxy if you are using Apache). This would allow you to use relative paths in your AJAX request, while the HTTP server would be acting as a proxy to any "remote" location.

                  在 mod_proxy 中設置反向代理的基本配置指令是 ProxyPass.您通常會按如下方式使用它:

                  The fundamental configuration directive to set up a reverse proxy in mod_proxy is the ProxyPass. You would typically use it as follows:

                  ProxyPass     /web-services/     http://third-party.com/web-services/
                  

                  在這種情況下,瀏覽器將請求 /web-services/service.xml,但服務器將通過充當 http://third-party 的代理來提供此服務.com/web-services/service.xml.

                  In this case, the browser would be requesting /web-services/service.xml but the server would serve this by acting as a proxy to http://third-party.com/web-services/service.xml.

                  這篇關于XMLHTTPRequest.status 在 FireFox 3.5 中返回 0 并且 responseText 為空白的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)

                  <i id='4YB1D'><tr id='4YB1D'><dt id='4YB1D'><q id='4YB1D'><span id='4YB1D'><b id='4YB1D'><form id='4YB1D'><ins id='4YB1D'></ins><ul id='4YB1D'></ul><sub id='4YB1D'></sub></form><legend id='4YB1D'></legend><bdo id='4YB1D'><pre id='4YB1D'><center id='4YB1D'></center></pre></bdo></b><th id='4YB1D'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4YB1D'><tfoot id='4YB1D'></tfoot><dl id='4YB1D'><fieldset id='4YB1D'></fieldset></dl></div>

                  <small id='4YB1D'></small><noframes id='4YB1D'>

                      <tbody id='4YB1D'></tbody>

                  1. <tfoot id='4YB1D'></tfoot>
                  2. <legend id='4YB1D'><style id='4YB1D'><dir id='4YB1D'><q id='4YB1D'></q></dir></style></legend>
                          • <bdo id='4YB1D'></bdo><ul id='4YB1D'></ul>
                            主站蜘蛛池模板: 黄网站免费在线 | 亚洲毛片在线观看 | 亚洲啪啪一区 | 亚洲精品一区在线 | 手机av在线 | 国产精品区二区三区日本 | 国产福利一区二区 | 国产九九九九 | 久操伊人 | 九九热这里| 国产日韩欧美一区二区 | 色婷婷综合久久久中文字幕 | 久久精品视频91 | 国产乱码精品一区二区三区忘忧草 | 久久青| 精品日韩一区 | 日韩精品成人在线 | 国产精品日韩在线观看 | 亚洲日韩欧美一区二区在线 | 久久精品中文 | 日本三级在线 | 国产专区视频 | 日本成人久久 | 日本在线视频不卡 | 亚洲视频中文字幕 | 久久久久久国产精品免费免费狐狸 | 久久久久国产精品一区 | 中文字字幕在线中文乱码范文 | gav成人免费播放视频 | 婷婷午夜天 | 精品亚洲永久免费精品 | 91精品在线播放 | 国产精品国产三级国产aⅴ入口 | 中文字幕一区二区三区四区 | 日韩免费在线观看视频 | 99精品国产一区二区青青牛奶 | 超碰在线免费公开 | 国产一级在线观看 | 日韩国产欧美一区 | 在线视频中文字幕 | 日韩欧美在线一区 |