I want to read text file’s comma separated variables in a java script array
right now i have hard coded values like this
var arrUserTags = new Array('{{Name}}','{{Address}}','{{Company}}');
but i want to read it from a text file dynamically on page load
how can i read it?
I am done with below solution but now i am facing 1 more problem.
When i do changes to text file that don’t become effective, while the browser takes the old values only? How to sort it out?
You need AJAX to load the file:
And then Split the text: