[Javascript] Import file

Hakan M (Backbase) hakan at backbase.com
Thu Apr 28 05:47:15 CDT 2005


Good sir, I guess you're asking if JavaScript has a similar function. 
The short answer is no. The not-quite-as-short-answer is that you can 
creat script tags and capture their state in major browsers, so writing 
a function to facilitate this is not very hard.

Have a look at onreadystatechange (IE) and onload (Moz) events on the 
script tag. There's probably some way to do it in other browsers as 
well, but I wouldn't care. Other people on this list are more up to date 
on other browsers than I am.

Regards,
H

Tim Burgan wrote:
> Hello,
> 
> I have an external javascript file, from within this file I wish to 
> import/include another external javascript file, in much the same way 
> that PHP users require() or include().
> 
> Does PHP have a similar function?
> 
> Thanks
> 
> Tim
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 
> 



More information about the Javascript mailing list