I'm building a form where a description field changes it's content based on the input (onchange event) of the form. I have multiple input fields and each have their own description.
What I have been doing in the past is for each field (this is a very small examle):
var wisdom = [' ', 'Seeker of Wisdom', 'Collector of Wisdom', 'Devotee of Wisdom', 'Devourer of Wisdom', 'Font of Wisdom', 'Oracle of Wisdom', 'Source of Wisdom'];
var wisdomp = [0, 100, 250, 550, 1200, 2500, 5000, 10000, 10000];
But initializing all these vars on the page doesn't seem right to me and creates a huge block of text. That's why I thought it would be better to read this data from an external file. I couldn't find a javascript file reader though.
Is there any better structure or method to keep and retrieve data using javascript?