Re: YUI Libraries



slebetman said the following on 1/1/2008 4:31 AM:
On Jan 1, 4:09 am, Peter Michaux <petermich...@xxxxxxxxx> wrote:
On Dec 24, 6:20 pm, Randy Webb <HikksNotAtH...@xxxxxxx> wrote:

<snip>

I don't think we are talking about the same thing. I am considering the
scenario where some bonehead decides he wants an "AJAX site" and simply
retrieves entire documents, inserts them via innerHTML into a container,
and then posts here wondering why the scripts aren't executed. And that
is asked a lot here.
If someone is trying to just "add AJAX" to a site then what happens
when he retrives a page that has document.write in it? I imagine you
draw the line there and that your solution doesn´t support that
situation, true?

Will you be writing up an article about your style of handling all of
this stuff? It seems you've been thinking about dynamic script
insertion and your style of XHR-free Ajax and experimenting for a long
time. I'd sure like to read a distillation of how all the bits work
together as a system, it's pros and cons, etc.

Incedentally, since we are talking about YUI, have a look at how YUI
does it. Look at the get utility and YUIloader.

100Kb uncompressed, 24kb minified, neither of which is very readable. Never thought I would see a 3200 line script to load dependent files though.

Both use dynamic script insertion instead of eval.

From what I read, it isn't doing what we are talking about. A search for createElement returns one place, at line 1017 (in the yuiloader-beta.js file). Then, it depends on UA detection and uses setAttribute.

Of course, YUI only supports loading .js and .css files and not .html so it isn't exactly "bonehead- proof". But that's a good thing IMHO.

What YUILoader appears to be for is loading dependent files and nothing more. If externalFile1.js needs externalFile2.js and externalFile3.js in order to operate properly then YUILoader loads those two files. But, it appears to only work with YUI Code.

I don't care to make a test case, but, if anybody is using it then you can possibly tell me how it deals with a case where it retrieves a document (complete or snippet) via AJAX that has script blocks in it. How does it go about executing those script blocks? Or does it?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.



Relevant Pages

  • Re: IFRAME & AJAX ; point me out
    ... Well 'to AJAX or not to AJAX' that is the question I was asking my self. ... Do I realy need AJAX and when I saw a script developed with javascript and that the script created an ActiveX object, ... After being defribillated :-) I thought of remote scripting using an IFRAME, after all I read a lot about how to do this and I tried to give it a shot. ...
    (comp.lang.javascript)
  • Re: [PHP] Closing a connection to browser without exiting the script
    ... I think the Ajax solution that John suggests is the ticket. ... My solution was to print the please wait message to the screen, while accessing the database using an Ajax call. ... I used Perl for my server-side script, but if you prefer PHP you can create a CGI script using PHP and run the same process as your original PHP page. ...
    (php.general)
  • Re: Gzip and Ajax
    ...  builds the form, presumably it buffers all screen data and gzips it, ... When the second script is called by Ajax it sends no ... pictures linked in tags!) and has its own headers, ...
    (comp.lang.php)
  • Re: Javascript Library
    ... inserting them in a container element via innerHTML and then proclaiming ... All in the name of having an "Ajax site." ... Last function I posted to attempt to deal with script execution? ... var isIE = false; ...
    (comp.lang.javascript)
  • Re: Problem with XmlHttpRequest (0x80040111 / nsIXMLHttpRequest.status) on several configurations
    ... Can someone tell me why Firefox is not working with AJax and ONLY for ... Source File: /java/ajax.js ... is used in other places and works in FF, so why is this script playing ...
    (comp.lang.javascript)