Interchange Developer Resource
[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

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



> My client needs to use javascripts for their Interchange site, to be 
> called from html files under /pages.  These javascripts are in *.js 
> files, which I presume should not be kept together in the /pages 
> directory, right?  
> 
> However, if I put the *.js files into another directory, say ../js 
> (where /pages is the current directory), how should I call these js 
> files from my html files in /pages ?  I tried the following, but both 
>  failed:
> 
> <script language="JavaScript" src="js/menu.js"></script>
> <script language="JavaScript" src="../js/menu.js"></script>
> 
> What should be the correct way to call the js files?
>
the absolute path from your document root, ie
src="/js/menu.js"


Search for: Sort by: