windandwaves wrote:
> Hi Folk
>
> This seems like a really stupid question. Can you include a javascript
> file in a javascript file?
>
> Rather than doing this:
>
> <script src="A"></script>
> <script src="B"></script>
>
> I want to do
>
> <script src="A"></script>
>
> and then have in script A:
>
> include("B");
>
> where include is a magic word that includes the file B.
>
> Thanks in advance
>
> Nicolaas
Add the following statement in the first javascript file
document.write('<script language="javascript" src="B.js"></script>')
HTH,
Angel
|