Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

JavaScript Include question

  Asked By: Dukker    Date: Jan 09    Category: Java    Views: 599
  

I have a JavaScript application. This application use one file which
exists in different directory. So, I use

<SCRIPT SRC="c:\temp\names.js" Language></SCRIPT>

so, I have some variable define in names.js and my JavaScript
application use thoese variable. But I want to use this application
on Linux as well. So, I have create a file in
linux /root/temp/names.js. So, my question is how can include this
in SRC tag. Any ideas.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Ludo Ricci     Answered On: Jan 09

try to use relative paths instead of absolute ones. For example, put
your js files to "js" subdirectory of the directory  where you keep
this html file  and then use this:

<script src="js/names.js"></script>

 
Answer #2    Answered By: Luigi Fischer     Answered On: Jan 09

but javascript  application has to be exists in
win2k box. I cannot copy the javascript folder in linux. basicall,
javascript application  is running on server and names.js is on
client.

 
Didn't find what you were looking for? Find more on JavaScript Include question Or get search suggestion and latest updates.




Tagged: