I want to read a text file which contains some names. the 1st line of the file is a number denoting the number of names in the file. sample file is like this
Presumably you don't have a server-side language available.
Probably the most practical way is an AJAX request, which you can research. Then where rq is your request object:
var myArray = rq.responseText.split( /\r?\n/ );