Re: Dynamic Loading of JS & CSS

Chris <[email protected]> Tue, 07 Mar 2006 19:41:36 -0500
Newsgroups gmane.comp.web.dom.wdf
Message-ID <[email protected]>
Hi Mandy,

It sounds like an out to use an IFrame, but what you're doing is so much 
like an IFrame... perhaps it's time to just use an IFrame. I would say 
that if your goal was to work from the existing CSS on the page, then a 
DOM load like this makes more sense - but since even the CSS sounds to 
be separate, an IFrame may actually simplify this entire implementation, 
in addition to solving your problem.

-Chris

Maninder, Singh wrote:
> Hello Guys,
>
> Following is my problem definition.
>
> I have a page (index.html) that has a button, clicking which an AJAX request is sent to the server (to server_response.html) and the result is populated in the mainContent div on index.html.
>
> Now server_response.html has a javascript include (include.js) in it. To take a simple case, include.js just has the following -
>
> alert('reached include.js');
>
> However, when the AJAX call is executed, the external js that comes with the server response is not evaluated. If I include inline js in server_response.html (eg <s*ript>alert('reached inside server_response');</s*ript>) this works fine.
>
> Similarly, if there is an external style sheet included, in IE even that is not evaluated.
>
> I have experimented with loading js using DOM - yes that works but only in IE & Firefox.
>
> What is the best workaround for it and what works in Safari?
>
> I know document.write is an alternative for safari but that loads the entire page again :(
>
> Any help would be appreciated.
>
> Thank you,
> Mandy.
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> Unsubscribe
> [email protected]
>
> List info
> http://www.quirksmode.org/dom/list.html 
> Yahoo! Groups Links
>
>
>
>  
>
>
>
>   



Unsubscribe
[email protected]

List info
http://www.quirksmode.org/dom/list.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wdf-dom/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/