aspose file tools*
The moose likes Servlets and the fly likes cending the contents of a text file to a javascript array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "cending the contents of a text file to a javascript array" Watch "cending the contents of a text file to a javascript array" New topic
Author

cending the contents of a text file to a javascript array

David McHugh
Greenhorn

Joined: Oct 01, 2008
Posts: 23
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

Joined: Jan 10, 2002
Posts: 60975
    
  65

You can format the page any way you want, including creating JavaScript variables to hold data.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cending the contents of a text file to a javascript array