# Edit webpage remotely

K

I'm an html / css hobbyist. Was persuaded to set up a friend's business
"brochure" site.

Now he wants interactivity -- specifically would like to edit online lists
of clients, perhaps in some sort of spreadsheet form. The idea is that his
staff would update online lists of students for the various first aid
courses he teaches.

He doesn't want to deal with the html behind the scenes -- just the text /
data.

Is such a thing possible without programming? I don't want to learn
programming for just this guy.

I was wondering if there was some server-side solution. I have used
javascripts from script farms for some simple stuff. Is there a way to
it again "invisibly"?

The other approach I'm thinking is to simply recommend one of the many free
file-hosting sites.

Or, perhaps someone knows of an online service that offers this?

Thoughts, suggestions?

M

K

The simplest thing for both you and him I can think of is to keep the list
in a separate text file that he can edit and upload to the server. Then on
the Web page where it is displayed use an include (SSI or PHP) to pull the
data in from the text file. I wouldn't mess with javascript because some
of the visitors to the site may have it disabled in their browser.

Doesn't that mean I'm into programming though?

I know generally how the include function works but I didn't realize that it
gave me remote "editability"

Can you give me an example -- online or one of your own -- how I would use
this?

M

H

I'm an html / css hobbyist. Was persuaded to set up a friend's business
"brochure" site.

Now he wants interactivity -- specifically would like to edit online lists
of clients, perhaps in some sort of spreadsheet form. The idea is that his
staff would update online lists of students for the various first aid
courses he teaches.

He doesn't want to deal with the html behind the scenes -- just the text /
data.

Is such a thing possible without programming? I don't want to learn
programming for just this guy.

I was wondering if there was some server-side solution. I have used
javascripts from script farms for some simple stuff. Is there a way to
it again "invisibly"?

The other approach I'm thinking is to simply recommend one of the many free
file-hosting sites.

Or, perhaps someone knows of an online service that offers this?

Thoughts, suggestions?

M

The easiest way is to display the Excel spreadsheet directly. You can
When it is to be updated then just replace the spreadsheet.

H

If you just link to it the site visitor will need to have Excel on his
computer and launch it to view the spreadsheet.  Similar issue to using
javascript:  The visitor may have it turned off in his browser.

Yes that's true. However, how many people today cannot read an XLS
file? Otherwise the uploaded file is going to need to be formatted.

K

I'm an html / css hobbyist. Was persuaded to set up a friend's business
"brochure" site.

Now he wants interactivity -- specifically would like to edit online lists
of clients, perhaps in some sort of spreadsheet form. The idea is that his
staff would update online lists of students for the various first aid
courses he teaches.
The easiest way is to display the Excel spreadsheet directly. You can
When it is to be updated then just replace the spreadsheet.

Sorry, but I don't understand this. Displaying the spreadsheet directly
doesn't give you the ability to update it directly AFAIK.

M

H

M

Yes

H

Sorry, I meant updating it in real time on the server. That way two
people couldn't be trying to change it at the same time.

D

#### dorayme

I'm an html / css hobbyist. Was persuaded to set up a friend's business
"brochure" site.

Now he wants interactivity -- specifically would like to edit online lists
of clients, perhaps in some sort of spreadsheet form. The idea is that his
staff would update online lists of students for the various first aid
courses he teaches.

He doesn't want to deal with the html behind the scenes -- just the text /
data.

Is such a thing possible without programming? I don't want to learn
programming for just this guy.

I was wondering if there was some server-side solution. I have used
javascripts from script farms for some simple stuff. Is there a way to
it again "invisibly"?

The other approach I'm thinking is to simply recommend one of the many free
file-hosting sites.

Or, perhaps someone knows of an online service that offers this?

Thoughts, suggestions?

You don't have to learn programming but you will be able to solve this
if you have a php script in your name.html to process a csv file.

It works like this, your client alters a spreadsheet how he likes,
exports it or saves it as a CSV (comma separated values) file. This
latter is a text file that is formatted a simple way with each row
represented by a line and each cell on the row represented by comma
separated text.

This CSV file is uploaded with the name "name.csv" to the server (you or
your client can do this easily). Ready and waiting for it is an html
file that you have prepared, inside of which is some code that looks
like this:

<?php

$filename = "1-9.csv"; //here's the filename$id = fopen($filename, "r"); //open the file while ($data = fgetcsv($id, filesize($filename))) //start a loop
$table[] =$data; //put each line into its own entry in the $table array fclose($id); //close file

echo "<tr><th>TOPIC</th><th>REFERENCE</th></tr>";

foreach($table as$row)
{
echo "<tr>";
foreach($row as$data)
echo "<td>$data&nbsp;</td>"; echo "</tr>\n"; } echo "</table>\n"; ?> When this part of the html file is being scanned by the server (it will be set up to note php code), it will then make up the html table properly grabbing all the values in the CSV file. You then end up with a proper html table, just what is wanted. Here is an example of the sort of thing that results using pretty well the code above. On the server, there is a file called a.csv and a file called a.html. The html file you can see in View Source except that where the table is, the actual one has the code above, it has been executed already by the time it reaches the browser: <http://www.khs.org.au/historian_database/a.html> Ignore the javascript on it as this is just for an inessential striping effect. You might be able to get some help tailoring your particular php requirement to your context at php.alt. Once set, you won't need to fiddle with it. And, you can either have the client upload the CSV file (which he will prepare from his spreadsheet program, it is just a matter of a saving it in as CSV) or he can send it or the original spreadsheet to you to do. I always prefer this latter so I can run an eye out over it for any anomalies (there are a few hiccups that can happen when saving as CSV.. but don't let this frighten you.). K #### Kabuki Armadillo dorayme said: You don't have to learn programming but you will be able to solve this if you have a php script in your name.html to process a csv file. It works like this, your client alters a spreadsheet how he likes, exports it or saves it as a CSV (comma separated values) file. I understand your solution and, for me anyway, it's not insurmountable to implement. But I can tell this is already going to overwhelm some employees who are going to be overwhelmed by the import / export and uploading issues. Thx for the effort though. I'm thinking now I might use Google Docs, setting up an account for his employees who could all log on and edit via their browsers in real time. For me anyway, it's probably the path of least resistance, though I eventually would like to get a handle on this programming thing. Thanks again for all the input. . . Cheers, M H #### houghi Kabuki said: I'm an html / css hobbyist. Was persuaded to set up a friend's business "brochure" site. Now he wants interactivity -- specifically would like to edit online lists of clients, perhaps in some sort of spreadsheet form. The idea is that his staff would update online lists of students for the various first aid courses he teaches. How many of these lists are we talking about? I was wondering if there was some server-side solution. I have used javascripts from script farms for some simple stuff. Is there a way to accomplish this with javascript? Say download the file, edit and then upload it again "invisibly"? I use on one site Tiny MCE. http://tinymce.moxiecode.com/ Basicaly I use php and the text I just include. I have removed everything that might distract the person from editing text. The person can only include text, make links, bold and italic. All the rest is removed. The hardest part was to let the person log in and have an icon they see once they are logged in, so they can click on it and be able to edit it, while others who can not log in are not able to edit. houghi -- H #### houghi Helpful said: Sorry, I meant updating it in real time on the server. That way two people couldn't be trying to change it at the same time. Now I am confused. I thought we were talking about textfiles and now we are talking about excel files? Those are, to me, complete different concepts. Also could you give an example of what would exactly needs to be updated and in what way. I asume there also needs to be some protection, because otherwise everybody will be able to change things. houghi Ad #### Advertisements D #### dorayme "Kabuki Armadillo said: I understand your solution and, for me anyway, it's not insurmountable to implement. But I can tell this is already going to overwhelm some employees who are going to be overwhelmed by the import / export and uploading issues. Thx for the effort though. I'm thinking now I might use Google Docs, setting up an account for his employees who could all log on and edit via their browsers in real time. For me anyway, it's probably the path of least resistance, though I eventually would like to get a handle on this programming thing. Thanks again for all the input. . . I understand. Which is another reason I have inclined to let clients simply send me their spreadsheets and I export and upload, very few mins work for me, using the technique I outlined. But if your client needs immediate results, obviously this will not work unless you are available and ready to act when he or she wants! J #### Joy Beeson However, how many people today cannot read an XLS file? I can't. And if I had a copy, I wouldn't instantiate it just to read a Web site. Unless, of course, the students mentioned are studying spread sheets. C #### Chaddy2222 I'm an html / css hobbyist. Was persuaded to set up a friend's business "brochure" site. Now he wants interactivity -- specifically would like to edit online lists of clients, perhaps in some sort of spreadsheet form. The idea is that his staff would update online lists of students for the various first aid courses he teaches. He doesn't want to deal with the html behind the scenes -- just the text / data. Is such a thing possible without programming? I don't want to learn programming for just this guy. I was wondering if there was some server-side solution. I have used javascripts from script farms for some simple stuff. Is there a way to accomplish this with javascript? Say download the file, edit and then upload it again "invisibly"? The other approach I'm thinking is to simply recommend one of the many free file-hosting sites. Or, perhaps someone knows of an online service that offers this? Thoughts, suggestions? You don't have to learn programming but you will be able to solve this if you have a php script in your name.html to process a csv file. It works like this, your client alters a spreadsheet how he likes, exports it or saves it as a CSV (comma separated values) file. This latter is a text file that is formatted a simple way with each row represented by a line and each cell on the row represented by comma separated text. This CSV file is uploaded with the name "name.csv" to the server (you or your client can do this easily). Ready and waiting for it is an html file that you have prepared, inside of which is some code that looks like this: <?php$filename = "1-9.csv"; //here's the filename

$id = fopen($filename, "r"); //open the file
while ($data = fgetcsv($id, filesize($filename))) //start a loop$table[] = $data; //put each line into its own entry in the$table array
fclose($id); //close file echo "<table id=\"spreadsheet\" cellspacing=\"0\">"; echo "<tr><th>TOPIC</th><th>REFERENCE</th></tr>"; foreach($table as $row) { echo "<tr>"; foreach($row as $data) echo "<td>$data&nbsp;</td>";
echo "</tr>\n";

}

echo "</table>\n";

?>

When this part of the html file is being scanned by the server (it will
be set up to note php code), it will then make up the html table
properly grabbing all the values in the CSV file.

You then end up with a proper html table, just what is wanted.

Here is an example of the sort of thing that results using pretty well
the code above. On the server, there is a file called a.csv and a file
called a.html. The html file you can see in View Source except that
where the table is, the actual one has the code above, it has been
executed already by the time it reaches the browser:

<http://www.khs.org.au/historian_database/a.html>

Ignore the javascript on it as this is just for an inessential striping
effect.

You might be able to get some help tailoring your particular php
requirement to your context at php.alt. Once set, you won't need to
fiddle with it.

And, you can either have the client upload the CSV file (which he will
prepare from his spreadsheet program, it is just a matter of a saving it
in as CSV) or he can send it or the original spreadsheet to you to do. I
always prefer this latter so I can run an eye out over it for any
anomalies (there are a few hiccups that can happen when saving as CSV..
but don't let this frighten you.).
Thanks for this dorayme. I have been looking for this kind of a
solution for the past few months. As I have a client who wants to
convert a spreadsheet to a more web friendly format, to display on his
website the members list of an association that he is setting up. This
method should work perfectly. With the table though if you wanted
parts of the data to have a different coloured background one would
presume that you could just style the table.

K

houghi said:
I use on one site Tiny MCE. http://tinymce.moxiecode.com/ Basicaly I use
php and the text I just include. I have removed everything that might
distract the person from editing text. The person can only include text,
make links, bold and italic. All the rest is removed.

Thx, I've filed this away for further review. Looks like it could be useful.
.. .

M

D

#### dorayme

Thanks for this dorayme. I have been looking for this kind of a
solution for the past few months. As I have a client who wants to
convert a spreadsheet to a more web friendly format, to display on his
website the members list of an association that he is setting up. This
method should work perfectly. With the table though if you wanted
parts of the data to have a different coloured background one would
presume that you could just style the table.

Yes, you could. I can tell you that one site I have with a lot of
extensive tables, I could not face it and threw in that js you see and
spent the time saved driving up Canterbury Rd and eating Lebanese food
in Lakemba and such things... <g>

A

#### asdf

dorayme said:
Yes, you could. I can tell you that one site I have with a lot of
extensive tables, I could not face it and threw in that js you see and
spent the time saved driving up Canterbury Rd and eating Lebanese food
in Lakemba and such things... <g>

Canterbury Rd eh? Radar locked on....

D

#### dorayme

"asdf said:
and eating Lebanese food
Canterbury Rd eh? Radar locked on....

Coming from town, turn right at Haldon St... I said cheerfully to my
dining companion who knew the place, "Hey, let's park here so I can pick
up a beer at that pub there..." to which she replied, "No drinking at
the eating place we are going to, it is muslim..."

That stopped me in my tracks! The food was so good that water seemed
quite appropriate with it anyway!

(I was pulled over by NSW cops later and charged with being too far
under the blood/alcohol limit. "Where do you think you are, mate" says
the cop, "this is Australia. What's the bloody matter with yer?")

A

#### asdf

dorayme said:
Coming from town, turn right at Haldon St... I said cheerfully to my
dining companion who knew the place, "Hey, let's park here so I can pick
up a beer at that pub there..." to which she replied, "No drinking at
the eating place we are going to, it is muslim..."

That stopped me in my tracks! The food was so good that water seemed
quite appropriate with it anyway!

(I was pulled over by NSW cops later and charged with being too far
under the blood/alcohol limit. "Where do you think you are, mate" says
the cop, "this is Australia. What's the bloody matter with yer?")

Hahaha... I got something similar recently in Victoria...

Random breath check...

"Been drinking tonight, Sir"
"Yes officer"
"How much?"
"Two glasses of wine over 3 hours at dinner"
"Better blown in this then"
*blowwwwwwwww*
"Two glasses? You really weren't trying tonight, were you? I can't even
detect it. Have a good evening"
"Thank you officer, I will"

Apparently the reading was 0.0, and actually, it was more like 4 glasses

Mind you, if I'd been mentally unstable, no doubt I'd have had my head blown
off... ho hum.. "Such is Life" in Victoria )

J

#### Joy Beeson

Handles all MS documents that I know of, except maybe Visio files. You
can save the files in nearly any format you want too.

I have Open Office and use it a lot. If I ever instantiate it just to
read a Web site, that is going to be one INTERESTING Web site.

I can't imagine anyone dumb enough to write a Web site that can't be
read with a browser saying anything that interesting -- unless it's an
essay *about* Open Office, and I need to have it open so I can do the
exercises.