[Webinar] Streamline your web hosting managementRegister Today


Update html (on line)

Posted on 1999-11-29
Medium Priority
Last Modified: 2010-04-09

I have a website that includes an agenda (performance dates of a little music band)

I would like to update that agenda just by uploading a text file with the new dates and places in it.

Is this possible?

Thx  in advance.

Vivian   (Belgium)
Question by:msmidts
  • 4
  • 2
  • 2

Expert Comment

ID: 2242205
It is VERY possible IF your server supports server-side include files.  M$ IIS and personal web server do, and most popular web servers can be configured to do it rather easily.  You will need to check with your ISP.


Accepted Solution

Hobbez earned 140 total points
ID: 2243633
Yes, it it possible, and you don't have to use anything but javascript - but that could be complicated enough :o)

Heres what to do: You make an HTML page containing the formatting of the data in Javascript. The data itself is the placed in a Javascript file (filename.js) in the form

data_set = new Array(
"12.OCT.1999*Copenhagen*Town Square";
"14.OCT.1999*Stockholm*The Dome";
"18.OCT.1999*London*Royal Albert Hall";

Data is then read using :

for(i in data_set){
divide_data = the_data[i].split("*")

and so on.

Data can then be updated simply by updating the filename.js file.

Of course you have to gave FTP-access to do this.

And if you have no basic knowledge of Javascript, you probably don't know what I'm taking about :o)

Give a comment then, and I'll try to help you out.


Expert Comment

ID: 2243759

Although it may be a small point, doesn't your solution predicate that all browsers will support external JavaScript files?  If so, there is a small minority of users who will see nothing.

The server side solution, if it is available, does not impose that restriction.  There is also no need for complicated(?) code for reformatting.  The text can contain a few basic HTML tags (or as much formatting as desired).

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.


Expert Comment

ID: 2244762

Yes, but lets look at the numbers (in Denmark).

To get access to server side include you'll most likely have to pay for hosting the site.

In my case (where my domain is hosted) the prize is aprox. 10 USD/month standard, versus aprox. 24 USD/month to get access to serverside include (PHP3).

When looking at the statistics from the biggest ISP in Denmark, more than 90 percent of the users are surfing using browser version 3.x or newer. 81 % is using version 4.x or newer.

The corresponding numbers for my site shows an even greater number of MSIE 4.0+ users (>95%).

But you point is valid ofcourse, and should be considered.


Expert Comment

ID: 2244796
All valid points, and worthy of consideration.

Up to msmidts to determine cost/benefit for this particular site/application.

If you are on an Apache server (or probably other Unix box), adding a line or two to the .htaccess file will get the job done.  If you are on an NT box, it is already done for you (ASP supports SSI by default).

I agree about the browsers (I am getting tired of writing code for v.3 browsers), but they are still out there, so it depends on your user base.

IMHO, if you are trying to reach the users, you should incur the expense.  If you don't care about alienating a small minority of users, that's your (valid) choice.

Just trying to cover all the bases.


Author Comment

ID: 2260352
To hobbez:
Thanks for the answer.
Can't evaluate it right now, i'll have to try it

To the others thx for the comments


Author Comment

ID: 2272956
To hobbez:


I tried it out - it's not working
Could You please send me an html file and a .js file to try it out?



Expert Comment

ID: 2277342

Not trying to step on hobbez, so, if this works, give him the credit.


data_set = new Array()
data_set[0] = "12.OCT.1999*Copenhagen*Town Square"
data_set[1] = "14.OCT.1999*Stockholm*The Dome"
data_set[2] = "16.OCT.1999*Oslo*Stadium"
data_set[3] = "18.OCT.1999*London*Royal Albert Hall"

(each entry on a single line)



<script language=JavaScript src="sched.js"></script>
for(i in data_set){
divide_data = data_set[i].split("*")
document.writeln("<tr><td>" + divide_data[0] + "</td><td>" + divide_data[1] + "</td><td>" +

divide_data[2] + "</td></tr>")

(be careful of inappropriate line breaks).

This should give you an idea of where this is going.



Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question