[Javascript] reassign the script src attribute

Mike Dougherty mdougherty at pbp.com
Thu Aug 18 09:28:21 CDT 2005


fyi - IE appears to not 're-read' the head section for DOM-inserted scripts.  So if you want to 
use this dynamic script trick, you have to insert into a child of the body.  Since Firefox doesn't 
seem to care where the scripts go, it seems x-compatible. (I only tested IE & Firefox, since this 
is an intranet app)


On Thu, 18 Aug 2005 08:17:22 -0500
  Triche Osborne <wdlists at triche-osborne.com> wrote:
> Mike Dougherty wrote:
>> That sounds very similar to my test :)
>> 
>> I was able to have this work: (test() is an alert function in f1.js and 
>> f2.js files)
>> 
>> <script type='text/javascript'>
>>     var s = document.createElement('script')
> 
> Rats, I should have thought of that. Glad you did though!
> 
> Triche
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 
> 
> __________________________________________________________
> This message was scanned by ATX
> 8:59:11 AM ET - 8/18/2005




More information about the Javascript mailing list