Changeset 4558 for MILK


Ignore:
Timestamp:
08/12/08 09:32:59 (11 years ago)
Author:
cbyrom
Message:

Fix problem with asynch loading of data - due to unreliable onload event handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/public/js/queueDeployments.js

    r4535 r4558  
    8484}; 
    8585 
    86 window.onload = function (e) { 
    87     for (var i = 0; i < placeholderNames.size(); i++) 
    88     { 
    89             MyApp.render('#' + placeholderNames[i], dataTypes[i], urls[i]); 
    90     }; 
     86// NB, this is very slightly dangerous exposing the invocation here without an 
     87// event handler; ideally it would sit inside a window.onload handler - however 
     88// this is very unreliable since the object often initialises after the onload 
     89// event has fired!  The page generally renders very quickly, so the placeholders 
     90// should be available here without a problem. 
     91for (var i = 0; i < placeholderNames.size(); i++) 
     92{ 
     93        MyApp.render('#' + placeholderNames[i], dataTypes[i], urls[i]); 
    9194}; 
    9295 
     
    9598 
    9699}); 
    97  
Note: See TracChangeset for help on using the changeset viewer.