Options

multiple YE.on(window, "load"..) timing issues?

oxy8384oxy8384 Registered Users Posts: 389 Major grins
I am helping a smugger with his site and have seen the occasional 'Internet Explorer can not load the page' errors. Never seen this before and most articles on the web talk about pre-IE6 and fixes. I have painstakingly cleaned up most of his other Javascript, but noticed one thing in particular: there are two calls to YE.on(window, "load",...) - one to call addBulkThumbnail() and one to loadslideshow(). The problem has become VERY infrequent and intermittent, but I am not yet convinced that it is gone completely.
I was wondering if I would be better off combining these two calls into a single function and only calling YE.on(window, "load",...) once? Could there be a conflict or timing issue/race condition from these two calls that might cause such an intermittent issue? I'm still working my way through the YUI online docs, but hoped someone here might have some experience or expertise they could share...:scratch:dunno

TIA,

Bill

Comments

  • Options
    devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited August 25, 2007
    G'day Bill,

    Not sure about a race condition, but I would probably consolidate all the onload calls into YE.on function.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
Sign In or Register to comment.