Hello,
I apologize for posting prototype related email to this list, yet I
have not seen any reference to email or list on the prototype web site
and I know the author of that library is part of the rails development
team so I am trying to reach him.
Basically I have installed “FireBug” which is a
javascript/html/css/dom debugger for firefox and since I plugged
prototype.js and added a call to Ajax.PeriodicalUpdater() inside my
scripts I often get 3 errors in FireBug.
They also show up in firefox javascript console, so I know it is not
related to firebug. The error is “$A not defined”. And the line is
prototype.js:48.
My web page include the script like this:
Therefore I would expect that by the time firefox handle myscript.js that prototype is fully loaded. Yet because the error seems to occurs only sometime, and that in normal situation I do not have any error detected. I think there is a problem about synchronisation between .js files. Is there a system in place to allow a script such as myscript.js to check for the state of loading of prototype.js to remove such race? Or maybe I am totally mislead by all this and there is an even more rationnal explanation to all this? -- Yannick Koehler