[Javascript] Import file

Troy III Ajnej trojani2000 at hotmail.com
Sat Apr 30 16:15:22 CDT 2005


There's no similar to require() or include() function in JS, but there is a 
way to call any desired external js file in the from this external js

anywhere in the document give a blank oppening and closing script tag. Give 
it an ID or NAME
leave ist SRC string empty) and from another script build a function that 
will interact with some EVENT or any user action to set the location of your 
chosen external file.
scriptNAME.src='...\\externalscript2.js'


>From: Tim Burgan <email at timburgan.com>
>Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
>To: "[javascript] javascript at latech.edu" <javascript at LaTech.edu>
>Subject: [Javascript] Import file
>Date: Thu, 28 Apr 2005 18:30:32 +0930
>
>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

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




More information about the Javascript mailing list