1

I am curious if it is possible to read property file with jQuery and obtain key=value pair. My property file name my.properties looks like this

# My local config
address=http://www.google.com
link=/mylink

I need somehow to get value http://www.google.com

I found some i18 plugin, but I am using lots of plugins already and I don't want to use another one.

Thanks for help

-Roman

Jamalissimo
  • 127
  • 3
  • 13
  • 1
    Is this a local file? If so, forget about this. Would you like javascript code from web sites accessing your local files? I don't think so. – emerson.marini Sep 05 '13 at 13:33
  • Do you have the power to change the way the config file looks? if so Id suggest looking at JSON. JSON is simple terms is a dataset contained inside a string e.g {"address":"google.com", "link":"/mylink"} it is easily readable in jquery. Ideally your config file needs to be JSON, XML or YAML – azzy81 Sep 05 '13 at 13:35
  • Check this out: http://stackoverflow.com/questions/18637418/trying-to-load-local-json-file-to-show-data-in-a-html-page-using-jquery – emerson.marini Sep 05 '13 at 13:44
  • thanks for the answers. I was not really sure if it is possible. Unfortunatelly I can't change the format of my config file so I will have to figure out different approach. Thanks -Roman – Jamalissimo Sep 06 '13 at 05:52

0 Answers0