Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Read Contents from a .txt into a webpage

Featured Replies

Hi Guys,

i have a wepage that all i want to do is put text over certain parts of it, without having to edit the html every time i open the page.

I want this text to be read from a text file (in same dir) .

What would be the simplest way???

Is it possible to use javascript, or flash or what

Thanks Guys


Hiya,

The easiest way to do this IMHO is with a javascript document.write in an external ".js" file. A ".js" file is called by a "<script src=yourscript.js>" and closed with "</script>" just like a normal script. The .js file itself is plain text and can be used to simply output text (or html) to be written dynamically to a page when used with the javascript document.write function.

You can find this script easily anywhere on the web.

A simple .js file to write some plain text to a page:

<!-- document.write("

Put your text, form, html-markup for image, links, etc.  in here, but no matched parentheses!  We do NOT want to close our script early...

") //-->

PLEASE don't use flash unneccessarily, some (the majority, possibly) of users are still on dialup...

Edited by nateklomp

Hi,

As I think the easies way is to create Inline Frame in the page!!

...

I have tested a lot of ActiveXobjects to read/write file in my localhost (I mean in the hard disk only).

But,..

I think there is a way in using JavaScript in this position (for that aim)

....

I will reply to this as soon as I find the answer

Hiya,

The easiest way to do this IMHO is with a javascript document.write in an external ".js" file.  A ".js" file is called by a "<script src=yourscript.js>" and closed with "</script>" just like a normal script.  The .js file itself is plain text and can be used to simply output text (or html) to be written dynamically to a page when used with the javascript document.write function. 

You can find this script easily anywhere on the web.

A simple .js file to write some plain text to a page:

<!-- document.write("

Put your text, form, html-markup for image, links, etc.  in here, but no matched parentheses!  We do NOT want to close our script early...

") //-->

PLEASE don't use flash unneccessarily, some (the majority, possibly) of users are still on dialup...

Ohh,..yeah

BUT, this should only work with JS files (only)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.