开发者

Get request being aborted in Internet Explorer 9

If you'll visit the site lab.buffspec.com SPECIFICALLY using Internet Explorer 9 and select a gildan 6.1, a hanes 6.1 or a gildan hood and then click on the get pricing button you will see that despite updating the quantity the total price isn't shown. This happens in Internet Explorer 9 only for these 3 shirts, the others work fine. And this behavior occurs only in IE9, the site works fine in firefox and chrome. When I select Developer tools in IE9 and go the network tab and start capturing, I find that the request shows '(Aborted)' and the initiator tab shows '(Pending)'.

Does anyone know what is happening here? I haven't checked with other versions of internet explorer.

Also, the response and request are in 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;
    }

This is the flex function that builds the XML request when the 'Get Pricing' button is clicked.

<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>

This is the code for the stepper that increases the quantity and is supposed to call the get pricing button.

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

Finally, getPrices is an httpservice that gets the corresponding result from http://www.buffspec.com/store/lab/getPricing.php as an XML file.

I noticed that the content type is 'text/plain' for both request and response if that means anything. Also the response is HTTP/200, so I don't know WHY it's getting aborted.


Well, I finally figured it out. The URL that's being sent via the GET method which is the default for e4x is more than 2083 characters, which is Internet Explorer's upper limit. The moment a URL of this size is recieved by Internet Explorer it just abortd the GET method's execution. Hope this helps anyone with a similar issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜