Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cending the contents of a text file to a javascript array

 
David McHugh
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

not usre if i am in the right area for this one, but the servlet is the starting point!!

i need to use a javascript sort function to sort array values, i am going to use the split function to seperate each set of values.

What my main question is how do i send the whole text file contents to the browser to populate the array, i do not need the contents displaying, just to poulate the array, then i will use the javascript sort function.

i currently use a standard println to print vaues to the screen but now i need javascript to handle all the processing, hope this makes sense? but the values must come from the text file not the client side, e.g. static or form values.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can format the page any way you want, including creating JavaScript variables to hold data.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic