4

I have a properties file , now using javascript code i want to read key value from the properties file.

Kundan Atre
  • 3,853
  • 5
  • 26
  • 39
  • 3
    Please be more specific on your task and environment. Are you talking about reading local file that is on your filesystem, from a web-browser? – n1313 Mar 12 '12 at 10:21

3 Answers3

0

Have a look at this jquery plugin : http://code.google.com/p/jquery-i18n-properties/

Nicolas Forney
  • 868
  • 2
  • 13
  • 21
0

If we are talking about javascript reading local file from a web-browser, then you can't do that due to security limitations. On the other hand, Javascript can read a remote file from a web-site using different techniques (AJAX, for example).

n1313
  • 20,555
  • 7
  • 31
  • 46
-1

You can use jQuery. Your properties file may be in JSON format. Then you can use this :

jQuery.getJSON( your_properties_file_url );
Alytrem
  • 2,620
  • 1
  • 12
  • 13