Question:
Reading text from a file in Java?
anonymous
2007-02-22 18:57:32 UTC
Is there a relatively simple way to read text from a file into a string variable using javascripting on a website?

I need to be able to read text from a file so I can dump it into an innerHTML command.

Thanks
Three answers:
Damian
2007-02-22 20:23:59 UTC
I skimmed the article but it looks like it describes what you want.



http://www.expertsrt.com/tutorials/Rod/JSread.php
rukhsar
2016-11-25 06:06:54 UTC
examining the checklist is easy--using the excellent suited documents shape to do what you p.c. is a lot much less uncomplicated. What do you p.c. extra help with? additionally, what documents structures do you already hit upon out approximately? There are fairly some different suggestions on the thank you to aim this. One is to stick to a hash table, yet yet another is to create an merchandise which holds the string and count huge style style, then you quite definitely can use an array checklist, a binary seek for tree, or, back, a hash table. Which seems optimal determine for to be what you're meant to do? BTW, if that's no longer for a sort, then actual, some subject like AWK or PERL is likely a extra useful programming language to aim this in fairly than Java. Edit: ok, you probable did now no longer answer my question approximately documents structures. So it rather is one thought, you should use a hash table which makes use of the URL string as a key and holds the integer count huge style style as its fee. each and every time you be conscious a clean URL, you basically seem it up interior the Hash table, if it rather is there, then increment its fee in any diverse case upload the present URL and set its fee to a million.
jessieg14
2007-02-22 20:48:54 UTC
I think Damian already answered this but just to let you know as general information Java and Javascript, despite the name, are very very different languages and mixing them up would cause a lot of trouble.



Good luck


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...