Opened 16 years ago

Closed 15 years ago

#935 closed defect (fixed)

Error event is fired twice.

Reported by: anonymous Owned by: anonymous
Priority: low Milestone: 0.9
Component: General Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


        <title>Dojo: Hello World!</title>

    <!-- SECTION 1 -->
        <script type="text/javascript" src="js/dojo/dojo.js"></script>
        <!-- SECTION 2 -->
        <script type="text/javascript">
          // Load Dojo's code relating to widget managing functions
          // Load Dojo's code relating to the Button2 widget
          var firstTime = false;
          function helloPressed() {
             firstTime = true;
                url: 'response.txt',
                load: function(type, data, evt){ 
                error: function(type, error) {
                   alert('Error when retrieving data from the server!');
 function init()
        var helloButton = dojo.widget.byId('helloButton');
        dojo.event.connect(helloButton, 'onClick', 'helloPressed')



        <button dojoType="Button2" caption="Hello World" widgetId="helloButton"/>

The above code produce two alert boxes if the response.txt file is missing, which means the error event is fired twice.

Change History (3)

comment:1 Changed 16 years ago by dylan

Milestone: 0.5

comment:2 Changed 16 years ago by bill

I wonder if this is a file:// URL or a http:// url. Because doesn't support file system access at all, right? At least not the xmlhttp transport.

comment:3 Changed 15 years ago by alex

Resolution: fixed
Status: newclosed

in 0.9, we only get the error callback once. Marking fixed.

Note: See TracTickets for help on using tickets.