Opened 8 years ago

Closed 8 years ago

#13275 closed defect (fixed)

dijit.layout.ContentPane onDownloadError is not triggered when there is no response from server.

Reported by: zimnyx Owned by:
Priority: high Milestone: 1.6.1
Component: Dijit Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:

Description

When server is down and we try: contentPane.set('href', 'http://serwer-down.org') onDownloadError isn't triggered, but JS error occours.

Change History (3)

comment:1 Changed 8 years ago by Douglas Hays

xhrGet is returning an empty string and no error. Presumably something to do with same-origin policy. I don't think this is fixable.

comment:2 Changed 8 years ago by zimnyx

It's fixed in 1.6.1. Please close it.

Btw. I was talking about request to same server so same-origin policy doesn't count. Here is example code that works in 1.6.1 and not in 1.6.0.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr">
    <head>
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js" djConfig="parseOnLoad: true"> </script>
        <script type="text/javascript">
            dojo.require("dijit.layout.ContentPane");
            dojo.addOnLoad(function(){
                dijit.byId('zzz').onDownloadError = function(){
                    alert('error occoured');
                };
              dojo.connect(dojo.byId('bzzz'), 'onclick', function(){ dijit.byId('zzz').set('href', 'oo')})
        });
        </script>
    </head>
    
    <body>
        <button id="bzzz">DAWAJ!</button>
        <div dojoType="dijit.layout.ContentPane" id="zzz">
            First load this page, then turn off webserver and click the button.
        </div>
    </body>
    
</html>

comment:3 Changed 8 years ago by bill

Milestone: tbd1.6.1
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.