If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

how to use javascript in html to read txt file and display it ?

I am newer ,pls help me achieve the following functions,
1>use javascript in html to read local txt file (when client browser open this html,start to read local txt file)
2>find all these lines including "@" from the txt file.
3>display the lines including "@" in client browser(when he open this html)

that'all,I think it is easy to do it,but i don't know,looking forwards to your help(best to give me entire codes,very appreciate ),thanks very much.

I am newer ,pls help me achieve the following functions,
1>use javascript in html to read local txt file (when client browser open this html,start to read local txt file)
2>find all these lines including "@" from the txt file.
3>display the lines including "@" in client browser(when he open this html)

that'all,I think it is easy to do it,but i don't know,looking forwards to your help(best to give me entire codes,very appreciate ),thanks very much.

The forum is not a coding service. You need to show your attempts and we can comment on them.
Read the 'stickies' at the main site about homework assignments.

Note, JS cannot read a text file on a local computer (with the exception on only one browser)
The most common access to a text file is from an internet server using ajax code logic.

i can't get answer ,can u give me suggestion how to replace fopen and fread using js same command? acutally i have a confuse,because in this link : http://www.ehow.com/how_5996745_read...avascript.html ,it said it is js command.
looking forwards to your help,thanks.

i can't get answer ,can u give me suggestion how to replace fopen and fread using js same command? acutally i have a confuse,because in this link : http://www.ehow.com/how_5996745_read...avascript.html ,it said it is js command.
looking forwards to your help,thanks.

Probably because it only works on MSIE.
What browser and version are you using?

If all the writers had the honesty to say that they use HTLML5 and that their scripts work only on the most recent browsers, we avoid many confusions... The HTML5 proposed solution work only with windows7 (Internet explorer 9 can not be settled on older system).

A solution supported by more browsers an system consists, as suggests Ayse, in using Ajax. Here is an other example (See the source) build with the page XHTMLRequest functions from Peter-Paul Koch...

Inputting address into code

I am using the code that 'rnd me' submitted, but am having issues hard inputting the address into it. I'm building a situational awareness page at work that runs off of our local drive. Currently we just iframe a few .txt files from the Space Weather Prediction Center, but I would like to readastext them and write them so I could modify the text with css. I do not need to use the input=file as the address never changes, but I'm having a heck of time getting to work... any thoughts?

If all the writers had the honesty to say that they use HTLML5 and that their scripts work only on the most recent browsers, we avoid many confusions... The HTML5 proposed solution work only with windows7 (Internet explorer 9 can not be settled on older system).

not true.
firefox and chrome run on windows XP-win8 and mac and mobile.
IE9 only needs windows Vista, not win7.

all told, HTML is supported on about 9/10 devices, and that final ten percent should be converted over the next couple of years to about 2%.

Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com