how can I do a kind of properties file using javascript ?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Pep_Grifell
Posted On:   Thursday, March 27, 2003 11:47 PM

Hi, I would like to know if I can do the following : I would like to know a kind of properties file, I thought about a js file (created inside a java program). Then in a html, include the js file an use the information stored there. ex: info.js : var a1 = abc; var a2 = def; ... p.html : include the info.js file and access a1, a2 ... Is this possible ? Thanks !    More>>

Hi,


I would like to know if I can do the following :



I would like to know a kind of properties file, I thought about a js file (created inside a java program).



Then in a html, include the js file an use the information stored there.



ex:



info.js :



var a1 = abc;
var a2 = def;
...



p.html :



include the info.js file and access a1, a2 ...



Is this possible ?



Thanks !

   <<Less

Re: how can I do a kind of properties file using javascript ?

Posted By:   Nitesh_Naveen  
Posted On:   Friday, March 28, 2003 02:20 AM

In case the js is dnamically created, you need to save it on the server temporarily and then include the file with a relative path to that file.

Re: how can I do a kind of properties file using javascript ?

Posted By:   Anonymous  
Posted On:   Friday, March 28, 2003 01:52 AM

You can write js-code (info.js) which holds the data and include it the html page (p.html).

info.js
var a1 = abc;
var a2 = def;
...

p.html








About | Sitemap | Contact