I've made a ticket with an attached patch that adds a script insertion
method a few months ago, right here:
http://dev.rubyonrails.org/ticket/9871

I also believe that this method works with Safari 2 (It works with
Konqueror). And so far, It has worked very well for me.


On Nov 22, 11:56 am, "Richard Quadling" <[EMAIL PROTECTED]>
wrote:
> Here is the Scriptaculous.require method ...
>
> var Scriptaculous = {
>   Version: '1.8.0',
>   require: function(libraryName) {
>     // inserting via DOM fails in Safari 2.0, so brute force approach
>     document.write('<script type="text/javascript"
> src="'+libraryName+'"><\/script>');
>   },
>
> Notice the comment? I'm not in a position to test this (I don't have Safari).
>
> On 22/11/2007, tbela99 <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hello Mr Ken,
>
> > you did not understand me very well, i do the same thing as you do,
> > merging many javascript and css files into single files to optimize
> > resources. but i do not merge all files at once. as user need, i may
> > dynamically load one or many optimized file, and this does not require
> > XMLHTTPRequest, just setting up a <script> or <link> correctly and
> > push it into the head section, this make the browser load the file.
>
> > function loadScript(src) {
> > myScript = document.createElement('SCRIPT');
> > myScript.src = url
> > my.type = 'text/javascript';
> > ...
> > }
>
> > after that, you just insert the script into the head section of the
> > page. you  can do the same for css with the link element. additionnaly
> > you may add a way to set up a callback function that control the
> > loading state.
>
> > -- best regards --
>
> --
> -----
> Richard Quadling
> Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498&r=213474731
> "Standing on the shoulders of some very clever giants!"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to