Jump to content

Recommended Posts

Posted

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


Posted (edited)

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
Posted

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

Posted
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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...