Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q267 Can JavaScript read text files?

irt.org | Knowledge Base | JavaScript | File | Q267 [ previous next ]

Q267 Can JavaScript read text files?

This is not really possible. JavaScript provides no means to read text files. There are some potential hacks/workarounds that might work in some browsers.

Internet Explorer 4 allows you to read the contents of the page. using innerText, outerText, innerHTML and outerHTML, you could use this to read the contents of a hidden frame. Internet Explorer 4 also supports data binding, which allows simple client side databases using CSV text files.

Most browsers now support JavaScript *.js source files. You could use JavaScript to hold text that you later display. Used with frames you could load different files of JavaScript/text at different times.

Feedback on 'Q267 Can JavaScript read text files?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.