[Javascript] Reaching out to external JS file.

BEKIM BACAJ trojani2000 at hotmail.com
Sat Oct 4 10:10:20 CDT 2003


If your sxripts and files reside in the same level domain, relative links 
shoud work, but I'm not sure, what you're trying to achieve here?!

And don't forget, you are overwriting the page that holds the script-caller, 
'myscript' instantly as the page loads, and this page does't exist anymore, 
there is no way you can reference to it again, because the name and the 
address  are in another format now ...folder_myScript.js orsomething like 
it. This, that, the script myscript is unreachable if you have overwritten 
the page once.

Think it over



>From: Thierry Lavallée <thierry at 8p-design.com>
>Reply-To: "[JavaScript List]" <javascript at LaTech.edu>
>To: <javascript at LaTech.edu>
>Subject: [Javascript] Reaching out to external JS file.
>Date: Fri, 03 Oct 2003 16:30:21 -0400
>
>Hi!
>I am importing a myscript.js file within a file. I use:
><csscriptdict import>
><script type="text/javascript" src="../myscript.js "></script>
></csscriptdict>
>
>This script references another file like this:
>document.write("<link href='IE.css' rel='stylesheet' media='screen'>")
>
>Unfortunately this myscript.js file is to be called from other pages within
>the site and their hierarchy levels differ.
>
>Is it possible to make sure the links are right?
>I tried putting direct URLs for the src and href, but it does not seem to
>work better.
>
>What am I missing?
>thanks!
>--
>Thierry
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail




More information about the Javascript mailing list