[ic] How to access another directory from /pages?

Interchange User interchange-users@icdevgroup.org
Thu Sep 12 17:01:08 2002


On Thursday 12 September 2002 04:43, you wrote:
> Hello,
>
> IU> However, if I put the *.js files into another directory, say
> ../js IU> (where /pages is the current directory), how should I
> call these js IU> files from my html files in /pages ?  I tried the
> following, but both IU>  failed:
>
> IU> <script language="JavaScript" src="js/menu.js"></script>
> IU> <script language="JavaScript" src="../js/menu.js"></script>
>
> you should put them in your normal html-space like the images.
>
> Then you could call them with SRC="/js-path/script.js".
> If you want to be mor flexible define a new variable
> __THEME_JS_DIR__

Thanks for all the responses... 
However, looks like the "src" needs to refer to an absolute URL ...

What worked:
src="http://www.mydomain.com/js/menu.js"
But this is outside the IC space.  My project URL usually look like:
http://www.mydomain.com/store/myproject/sample.html

What didn't work:
src="/js/menu.js"
src="js/menu.js"
src="menu.js"
src="../js/menu.js"

I've put this menu.js file all over the place in the hopes of one of 
them hitting the jackpot, including:
/pages
/pages/js
../js

But nothing worked.

Is there a way I can put an absolute path to menu.js within the IC 
space?  

I tried something like:
src="http://www.mydomain.com/store/myproject/js/menu.js"
but still didn't work.