Update html (on line)

HI,

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)
msmidtsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TTomCommented:
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.

Tom
0
HobbezCommented:
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";
"16.OCT.1999*Oslo*Stadium";
"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.

/Rob
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TTomCommented:
Rob:

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).

Tom
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

HobbezCommented:
Tom:

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.

/Rob
0
TTomCommented:
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.

Tom
0
msmidtsAuthor Commented:
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


0
msmidtsAuthor Commented:
To hobbez:

Hi,

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

Thx,

Vivian
0
TTomCommented:
Vivian:

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

sched.js:

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)

display.htm:

<htmL>
<head>

<script language=JavaScript src="sched.js"></script>
</head>
<body>
<table>
<script>
document.open();
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>")
}
document.close();
</script>
</table>
</body></HTML>

(be careful of inappropriate line breaks).

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

Tom

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.