Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Import file


  • From: trojani2000 at hotmail.com (Troy III Ajnej)
  • Subject: [Javascript] Import file
  • Date: Sat Apr 30 16:15:28 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@xxxxxxxxxxxxx>
>Reply-To: "[JavaScript List]" <javascript@xxxxxxxxxx>
>To: "[javascript] javascript@xxxxxxxxxx" <javascript@xxxxxxxxxx>
>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@xxxxxxxxxx
>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/