[Proto-Scripty] PeriodicalExecuter loading scripts dynamically - in order

2010-01-13 Thread gingerbbm
Dear all I am loading a number of JavaScript files dynamically by appending to the element. To ensure they're added in the correct order I came up with the following code which uses a PeriodicalExecuter to step through an array of script names as and when an anticipated object in each script beco

[Proto-Scripty] Re: PeriodicalExecuter loading scripts dynamically - in order

2010-01-13 Thread gingerbbm
Hi T.J. 'scriptadded' does get reset to false just after the loop counter 'i' is incremented, and in fact through Firebug I can see the tags appearing in the HTML - so I know this aspect of the code is working. > OT: Why the `eval`? I know its use is to be avoided but I couldn't see a way aroun

[Proto-Scripty] Re: PeriodicalExecuter loading scripts dynamically - in order

2010-01-13 Thread gingerbbm
Fantastic! Thank you T.J. :) Both modifications were required and the checkObjExists() function is dead handy. I really am very grateful because this is the best solution to my dynamic-loading requirement. I wanted to avoid having to rely on concatenating several scripts into one (although some k

[Proto-Scripty] evalJSON hangs IE

2008-11-13 Thread gingerbbm
Dear all I'm looking for inspiration. Take a look at this code: http://pastie.org/313941 In a simple HTML page this does what one would expect. But the exact same code on a page in my application hangs IE7 on the evalJSON() line (eventually I get a "Stop running this script?" prompt). I would

[Proto-Scripty] Re: evalJSON hangs IE

2008-11-13 Thread gingerbbm
Looks like Prototype 1.6.0.3 is conflicting with an earlier version that has been integrated into another app I'm using - MapGuide Fusion. Is there a way to run two different versions alongside each other?! --~--~-~--~~~---~--~~ You received this message because yo

[Proto-Scripty] Re: evalJSON hangs IE

2008-11-13 Thread gingerbbm
On Nov 13, 4:40 pm, kangax <[EMAIL PROTECTED]> wrote: > > How is it conflicting? Any more details? > No more details as yet. If only I had some way of debugging IE like I do with Firefox (Firebug). I'm not getting any errors but the CPU starts maxing out and eventually I get that prompt. --~--~--

[Proto-Scripty] Re: evalJSON hangs IE

2008-11-13 Thread gingerbbm
Alex Mcauley wrote: > have you tried to remove the single quotes around the json string ? evalJSON() is a method on String, so that doesn't work. At this point in time I'm satisfied it's a conflict: if I remove references to the other JavaScript (that itself references the old Prototype code) th

[Proto-Scripty] Re: evalJSON hangs IE

2008-11-13 Thread gingerbbm
Thanks for the tip but the code I posted was as a result of meticulously removing bits of a far bigger piece of code. The JSON is supposed to be returned by an Ajax.Request() so I assume it'll be coming through as a string, hence the code above. In any case, if I removed the link to the code cont

[Proto-Scripty] Effect.BlindDown on DIV with dynamic content

2009-06-18 Thread gingerbbm
Dear all I have a DIV that gets toggled using BlindDown and BlindUp as the user makes a selection from a dropdown list. The DIV contains a number of DIVs that correspond to the options in the dropdown list. Prior to calling Effect.BlindDown(), all the contained DIVs have their display style set