mherger;291999 Wrote:
>
>
> ?!? No idea what this should/would change. Did you try this?
>
Prototype Wrote:
>
> About evalScripts and defining functions
>
> If you use evalScripts: true, any <script> block will be evaluated.
> This does not mean it will get included in the page: they won't. Their
> content will simply be passed to the native eval() function. There are
> two consequences to this:
>
> * The local scope will be that of Prototype's internal processing
> function. Anything in your script declared with var will be discarded
> momentarily after evaluation, and at any rate will be invisible to the
> remainder of the page scripts.
> * If you define functions in there, you need to actually create
> them, otherwise they won't be accessible to the remainder of the page
> scripts. That is, the following code won't work:
>
>
> // This kind of script won't work if processed by Ajax.Updater:
> function coolFunc() {
> // Amazing stuff!
> }
>
> You will need to use the following syntax:
>
>
> // This kind of script WILL work if processed by Ajax.Updater:
> coolFunc = function() {
> // Amazing stuff!
> }
>
> ThatÂ’s a common trickster, biting beginners in the ankle. So watch
> out!
>
I can't try it on your plugin because I cannot get in to the code that
your plugin is generating. But I tried it on other pages and there it
does make a difference.
But you are right, the wrapper might actually not work, I'm still
thinking too much in compiler logic ;-)
I do see, though, that the main issue is access to get access to your
local variables (i and x), maybe you would have to change the whole
allmusic code to wrap everything into an object and that's probably not
worthwhile just for the slideshow functionality.
>
> I know there's a parameter in prototypjs' AJAX call to load JS code
> dynamically or not. Are you using it?
>
Yep, I do. It DOES load JS code and if you execute it once, it would
work, the problem is the context change.
--
pippin
---
see iPeng at penguinlovesmusic.com
------------------------------------------------------------------------
pippin's Profile: http://forums.slimdevices.com/member.php?userid=13777
View this thread: http://forums.slimdevices.com/showthread.php?t=43713
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins