Hi,

I have a div whose the content is loaded via Ajax after the user hits
a button. That content can be any HTML code - basically the whole
system has kind of an "open" plugin structure so I cannot estimate
what code will be inserted in the div.

The plugin developer who codes that content needs to have the freedom
to use any code his plugin requires. Therefore also including external
JS libraries (like jQuery) has to be possible if the developer wants
to use jQuery for his plugin.

However I cannot include the jQuery librarie dynamically via Ajax. I
tried really everything:
* Element.insert() -> fails because the <script>-tag of jQuery is
being interpreted
* document.write("<script...><\/script>") -> fails somehow making the
browser display a blank page and loading endlessly...
* Appending the script element to the head:
http://proto-scripty.wikidot.com/prototype:how-to-load-scripts-dynamically
-> jQuery methods cannot be found

I really cannot think of any other solution - though this scenario
should be quite popular, i think

How can I include external libraries in an ajax response?


Kind regards

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to