2011-09-27 86 views
2

如果您将访问网站lab.buffspec.com,请特别使用Internet Explorer 9并选择gildan 6.1,hanes 6.1或gildan hood,然后单击获取定价按钮将会看到,尽管更新了总量的数量没有显示。这只发生在Internet Explorer 9中,仅适用于这3件衬衫,其他人可以正常工作。而这种行为只发生在IE9中,该网站在Firefox和Chrome中正常工作。当我在IE9中选择开发人员工具并转到网络选项卡并开始捕获时,我发现请求显示'(Aborted)',启动器选项卡显示'(Pending)'。在Internet Explorer 9中取消请求正在中止

有没有人知道这里发生了什么?我没有检查与其他版本的Internet Explorer。

此外,响应和请求都是XML格式。

public static function getPricingXml(event:NumericStepperEvent = null):XML 
    { 
     for each (var side:String in ['front', 'back']) { 
      var workspace:Canvas = mx.core.Application.application[side + 'Workspace']; 

      var colors:Array = new Array(); 

      for each (var e:* in workspace.getChildren()) { 
       if (e is Image && e.includeInLayout) { 
        for each (var color:String in e.colors) { 
         if (color) { 
          color = color.toLowerCase(); 

          if (color && colors.indexOf(color) == -1) { 
           colors.push(color); 
          } 

         } 
        } 
       } 
      } 

      mx.core.Application.application[side + "TotalColors"].text = colors.length > 4 ? 4 : colors.length; 
     } 

     var xml:XML = <products> 
          <product requiresUndercoat={mx.core.Application.application.color.type !== 'white'}> 
           <color hexValue={mx.core.Application.application.color.hex_color} /> 
           <sides> 
            <front totalColors={mx.core.Application.application.frontTotalColors.text} /> 
            <back totalColors={mx.core.Application.application.backTotalColors.text} /> 
           </sides> 
           <sizes /> 
           {mx.core.Application.application.names.getXml()} 
          </product> 
         </products>; 

     var i:int = 0; 
     for each (var size:Object in mx.core.Application.application.color.sizes) { 
      xml.product.sizes.appendChild(<size name={size.name} abbreviation={size.abbreviation} quantity={mx.core.Application.application.priceSteppers[i++].value} price={size.price} />); 
     } 

     return xml; 
    } 

这是在单击“获取定价”按钮时构建XML请求的flex函数。

<mx:GridItem horizontalAlign="right" width="100%" fontWeight="normal" verticalAlign="middle"> 
             <mx:NumericStepper id="priceSteppers" value="0" maximum="599" fontSize="12" change="getPrices.send({ data: com.buffspec.Lab.getPricingXml(event) });" /> 
            </mx:GridItem> 

这是增加数量的步进器代码,应该调用get定价按钮。

<mx:HTTPService id="getPrices" url="http://www.buffspec.com/store/lab/getPricing.php" resultFormat="e4x" /> 

最后,getPrices是的HTTPService从http://www.buffspec.com/store/lab/getPricing.php得到相应的结果作为一个XML文件。

我注意到,如果这意味着什么,请求和响应的内容类型都是'text/plain'。此外,响应是HTTP/200,所以我不知道为什么它会中止。

+0

小心分享一些代码? –

+0

如果你可以分享一些代码,它会有所帮助。同时,你可以看看这篇文章的答案http://stackoverflow.com/questions/4450017/ie8-and-ie9-not-able-to-load-download-swf-file-from-server,可能会有问题IE8和IE9上的http标头 – Miral

回答

0

嗯,我终于明白了。通过作为e4x默认值的GET方法发送的URL超过2083个字符,这是Internet Explorer的上限。当Internet Explorer收到此大小的URL时,它只是放弃了GET方法的执行。希望这可以帮助任何有类似问题的人。