pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    • <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="0o22qgs" 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="0g2eyoc" 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 為空白的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我正在嘗試訪問(wèn)第三方 URL 以獲取 XML 響應(yīng)并將響應(yīng)顯示到我的網(wǎng)頁(yè)中.在 IE 和 Safari 瀏覽器中,我得到了狀態(tài)為 200 和 readystate 為 4 的正確響應(yīng).但在 FF3.5 和 Crome 中,我將 XMLHTTPRequest 狀態(tài)設(shè)為 0,而 reponseText 以空白字符串的形式出現(xiàn).我嘗試了許多選項(xiàng)來(lái)編寫普通的 XMLHTTPRequest Ajax 代碼以及為此 ajax 請(qǐng)求使用 Prototype 1.5 版本的 js 文件,但 FF 3.5 中的狀態(tài)和響應(yīng)文本仍然與 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.

                  任何幫助如何解決此問(wèn)題或?qū)е麓藛?wèn)題的確切原因?qū)⒉粍俑屑?我還嘗試在本地執(zhí)行我的代碼以及部署到網(wǎng)絡(luò)服務(wù)器,但 FF 中的響應(yīng)是相同的.

                  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>
                  

                  推薦答案

                  你好像碰到了 同源政策.您必須使用相對(duì)路徑,否則大多數(shù)瀏覽器只會(huì)返回一個(gè)空的 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 帖子可能也與您的問(wèn)題有關(guān):

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

                  • XMLHttpRequest 中的空響應(yīng)文本.

                  作為一種可能的解決方法,您可以設(shè)置一個(gè)非常簡(jiǎn)單的反向代理(使用 mod_proxy 如果您使用的是 Apache).這將允許您在 AJAX 請(qǐng)求中使用相對(duì)路徑,而 HTTP 服務(wù)器將充當(dāng)任何遠(yuǎn)程"位置的代理.

                  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 中設(shè)置反向代理的基本配置指令是 ProxyPass.您通常會(huì)按如下方式使用它:

                  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/
                  

                  在這種情況下,瀏覽器將請(qǐng)求 /web-services/service.xml,但服務(wù)器將通過(guò)充當(dāng) http://third-party 的代理來(lái)提供此服務(wù).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.

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

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

                  相關(guān)文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會(huì)等待 ajax 調(diào)用完成)
                  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 無(wú)法加載,請(qǐng)求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開發(fā)技術(shù)分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請(qǐng)求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)

                  <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="2ukieeo" 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>
                            主站蜘蛛池模板: 上海平衡机-单面卧式动平衡机-万向节动平衡机-圈带动平衡机厂家-上海申岢动平衡机制造有限公司 | 博博会2021_中国博物馆及相关产品与技术博览会【博博会】 | 注塑模具_塑料模具_塑胶模具_范仕达【官网】_东莞模具设计与制造加工厂家 | 酒精检测棒,数显温湿度计,酒安酒精测试仪,酒精检测仪,呼气式酒精检测仪-郑州欧诺仪器有限公司 | 报警器_家用防盗报警器_烟雾报警器_燃气报警器_防盗报警系统厂家-深圳市刻锐智能科技有限公司 | 酵素生产厂家_酵素OEM_酵素加盟_酵素ODM_酵素原料厂家_厦门益力康 | PAS糖原染色-CBA流式多因子-明胶酶谱MMP-上海研谨生物科技有限公司 | 样品瓶(色谱样品瓶)百科-浙江哈迈科技有限公司| 水篦子|雨篦子|镀锌格栅雨水篦子|不锈钢排水篦子|地下车库水箅子—安平县云航丝网制品厂 | 爱德华真空泵油/罗茨泵维修,爱发科-比其尔产品供应东莞/杭州/上海等全国各地 | 沥青车辙成型机-车托式混凝土取芯机-混凝土塑料试模|鑫高仪器 | 电杆荷载挠度测试仪-电杆荷载位移-管桩测试仪-北京绿野创能机电设备有限公司 | 北京网站建设公司_北京网站制作公司_北京网站设计公司-北京爱品特网站建站公司 | 大功率金属激光焊接机价格_不锈钢汽车配件|光纤自动激光焊接机设备-东莞市正信激光科技有限公司 定制奶茶纸杯_定制豆浆杯_广东纸杯厂_[绿保佳]一家专业生产纸杯碗的厂家 | 自动钻孔机-全自动数控钻孔机生产厂家-多米(广东)智能装备有限公司 | 洛阳防爆合格证办理-洛阳防爆认证机构-洛阳申请国家防爆合格证-洛阳本安防爆认证代办-洛阳沪南抚防爆电气技术服务有限公司 | 道达尔润滑油-食品级润滑油-道达尔导热油-合成导热油,深圳道达尔代理商合-深圳浩方正大官网 | 智能交通网_智能交通系统_ITS_交通监控_卫星导航_智能交通行业 | 北京发电机出租_发电机租赁_北京发电机维修 - 河北腾伦发电机出租 | 酒店品牌设计-酒店vi设计-酒店标识设计【国际级】VI策划公司 | 不锈钢法兰-碳钢法兰-法兰盘生产加工厂家-[鼎捷峰]-不锈钢法兰-碳钢法兰-法兰盘生产加工厂家-[鼎捷峰] | 双工位钻铣攻牙机-转换工作台钻攻中心-钻铣攻牙机一体机-浙江利硕自动化设备有限公司 | 苏州工作服定做-工作服定制-工作服厂家网站-尺品服饰科技(苏州)有限公司 | 郑州爱婴幼师学校_专业幼师培训_托育师培训_幼儿教育培训学校 | 震动筛选机|震动分筛机|筛粉机|振筛机|振荡筛-振动筛分设备专业生产厂家高服机械 | pos机办理,智能/扫码/二维码/微信支付宝pos机-北京万汇通宝商贸有限公司 | 矿用履带式平板车|探水钻机|气动架柱式钻机|架柱式液压回转钻机|履带式钻机-启睿探水钻机厂家 | 全自动面膜机_面膜折叠机价格_面膜灌装机定制_高速折棉机厂家-深圳市益豪科技有限公司 | 瑞典Blueair空气净化器租赁服务中心-专注新装修办公室除醛去异味服务! | 理化生实验室设备,吊装实验室设备,顶装实验室设备,实验室成套设备厂家,校园功能室设备,智慧书法教室方案 - 东莞市惠森教学设备有限公司 | 鲸鱼视觉 -数字展厅多媒体互动展示制作公司 | 洗石机-移动滚筒式,振动,螺旋,洗矿机-青州冠诚重工机械有限公司 | 环讯传媒,永康网络公司,永康网站建设,永康小程序开发制作,永康网站制作,武义网页设计,金华地区网站SEO优化推广 - 永康市环讯电子商务有限公司 | 智成电子深圳tdk一级代理-提供TDK电容电感贴片蜂鸣器磁芯lambda电源代理经销,TDK代理商有哪些TDK一级代理商排名查询。-深圳tdk一级代理 | 橡胶接头_橡胶软接头_套管伸缩器_管道伸缩器厂家-巩义市远大供水材料有限公司 | EDLC超级法拉电容器_LIC锂离子超级电容_超级电容模组_软包单体电容电池_轴向薄膜电力电容器_深圳佳名兴电容有限公司_JMX专注中高端品牌电容生产厂家 | 品牌设计_VI设计_电影海报设计_包装设计_LOGO设计-Bacross新越品牌顾问 | 橡胶弹簧|复合弹簧|橡胶球|振动筛配件-新乡市永鑫橡胶厂 | 上海办公室装修_上海店铺装修公司_厂房装潢设计_办公室装修 | 面粉仓_储酒罐_不锈钢储酒罐厂家-泰安鑫佳机械制造有限公司 | 磁力轮,磁力联轴器,磁齿轮,钕铁硼磁铁-北京磁运达厂家 |