I have a form on my website (based on Drupal),
and I’ve added a JS to it, now I have some messages like
Hints on input keydown.
I was wondering, where should I keep those messages
(since I don’t want them to be stored in each individual JS file
that I’ll be making from now on – but in one central place)
I have a form on my website (based on Drupal), and I’ve added a
Share
What about creating a js file for that effect, using a map to identify the strings?
Then you include this file and reference
strings["SaveAsHint"]in your code.Another alternative would be to store them in a database and use a callback to return this structure from the server (or, if you can afford it, use the local browser database in HTML5, filling it up once at application startup)