On 12/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> So ive been using scriptaculous and prototype for a while, and ive now
> been facing a huge problem for which i cant seem to find a solution.
> Its pretty obscure, and i guess it all comes down to the document.write
> method used in the scriptaculous loader class (scriptaculous.js), which
> seems to invalidate the DOM tree until the page is loaded or soemthing
> of this kind.
>
> Ive created my own dialog and windows classes out of base and
> prototype, inspired by lightbox.js.  Instead of putting the whole code
> in a single js file, i separated all classes.  Now, i wanted to load
> all these files without having to include them in all html files i do.
>
>
> I checked out the code for the scriptaculous loader , which seemed to
> do exactly what i wanted.  So i duplicated the class, changed all names
> to create a new class, loading the files i needed.  I thought it worked
> before i realized that when i was using both scriptaculous loader AND
> my dialog class loader, depending on which was first, the second never
> loaded any files.

I had a very similar or maybe identical problem and reported it to the
Scriptaculous trac. It was changed to "won't fix" even though I found
and reported a way to make it so the Scriptaculous script idea will
work twice. Perhaps there is an even better solution than the one I
found. I quickly abandoned this loading technique.

http://dev.rubyonrails.org/ticket/4335

This ticket could have been left open showing a desire to improve but
was closed for unknown reasons to me. I was very disappointed with the
general attitude that leaving broken code in place was ok in
Scriptaculous and hence in Rails. It is unfortunate that the
Scriptaculous file is still setting an example of broken code and
other people are copying it just like I tried.

I now don't think a file like the Scriptaculous loader is a very good
idea anyway. It just causes more client-server talk with no real
benefit.

Peter
-------
http://forkjavascript.org

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to