The Mother Board

Motherboards.org forums. Free tech support, motherboard ID, and more.
It is currently Tue Sep 25, 2018 1:49 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: HTML question
PostPosted: Tue Aug 03, 2004 8:22 am 
Offline
Brown Belt
Brown Belt

Joined: Tue Jan 07, 2003 4:38 am
Posts: 303
This post has been forwarded from another forum.

I've created a website for a friend and I wish to make the job of updating the site easy for him. What will need to be regularly updated is spreadsheet data, which I have tabled on the main HTML page.

Is there any way to insert spreadsheet data directly into an HTML document without having to create a massive table with thousands of <tr><td></td></tr> tags? Someone mentioned linking a spreadsheet to the HTML file.

Thanks,

Ken

_________________
Air Traffic Control Game


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 03, 2004 8:38 am 
Offline
Initiate
Initiate

Joined: Tue Mar 25, 2003 5:49 pm
Posts: 85
The easiest method I know is to create the table you are looking for is to use a programming language like PHP to run a loop. I would suggest dumping the spreadsheet information into a relational database. You need to query your database and force the loop to iterate as many times as the number of results your query generates.

You can hard code the <table></table> tags outside the loop.

sample code(this won't work without the SQL query or data variables)

$results = (the number of results returned from the query);

for (i = 0; i < $results; i++)
{
echo "<tr><td>[color=blue](your actual data)
</td></tr>";
}
[/color]

The idea is to get the programming language you use to do the drudge work of making all the tags you will need. The above sample is PHP, but you can use any language to create the loop.

Why is the data in a spreadsheet format? I'm not sure if a spreadsheet will be useful to publish directly to HTML, I've never tried it. My firts steps would be to convert the data into a comma delimited flat file or import the data into a database program.

tryn


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 03, 2004 11:37 am 
Offline
Brown Belt
Brown Belt

Joined: Tue Jan 07, 2003 4:38 am
Posts: 303
Holy smokes, I'm lost. I'm not much of a programmer. Just trying to get the hang of HTML. Here is a link to the page I'm talking about.

http://www3.telus.net/preciouseffects/GHUU

I built this table to organise his bookings. How would he (who is quite HTML illiterate) update the table of information on the page? I could explain how to update the table (eg. <td>information</td>) but I think it would be great if he could somehow just upload a spreadsheet or word document to his web server, and it would automatically appear. Any thoughts?

Ken

_________________
Air Traffic Control Game


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 03, 2004 5:49 pm 
Offline
Mobo-fu Master
Mobo-fu Master

Joined: Thu Jan 25, 2001 1:01 am
Posts: 19405
Location: 00000h - 0000Fh
Easiest thing to do would be to load the spreadsheet into Word and change it from there.

You can do something in Word and Save As HTML.

Image

_________________
"Imagination is the only weapon in the war against reality." -Jules de Gautier

Image


Top
 Profile  
Reply with quote  
 Post subject: .
PostPosted: Tue Aug 03, 2004 8:14 pm 
Offline
Brown Belt
Brown Belt

Joined: Tue Jan 07, 2003 4:38 am
Posts: 303
Great, thank you. My friend says he uses Word for his data table anyhow (not Excel as I mentioned earlier). So can I take a word document, save it as HTML, and embed it into the web page mentioned above? You see, the whole page is a table, and I'd like a word document to become a cell of that table.

Ken

_________________
Air Traffic Control Game


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Aug 03, 2004 8:29 pm 
Offline
Mobo-fu Master
Mobo-fu Master

Joined: Thu Jan 25, 2001 1:01 am
Posts: 19405
Location: 00000h - 0000Fh
You want to have a table and have a word document loaded into each cell? That's not going to work. I can't even fathom the code to make that work.

But you can make the table in word and update each cell that way. Then upload the entire table when finished.

_________________
"Imagination is the only weapon in the war against reality." -Jules de Gautier

Image


Top
 Profile  
Reply with quote  
 Post subject: .
PostPosted: Tue Aug 03, 2004 8:35 pm 
Offline
Brown Belt
Brown Belt

Joined: Tue Jan 07, 2003 4:38 am
Posts: 303
That's a great idea. Although I'm not sure how to put my rollovers, image mapping and .gif animations into the word document. I'll see what I can do. My goal here is to make a website with a list that is easy for somebody to update.

_________________
Air Traffic Control Game


Top
 Profile  
Reply with quote  
 Post subject: .
PostPosted: Tue Aug 03, 2004 8:58 pm 
Offline
Brown Belt
Brown Belt

Joined: Tue Jan 07, 2003 4:38 am
Posts: 303
I've figured out something that will work well for this guy. I've put all his data into a list, and that list will exist within a cell on the web page. He can easily swim through all the confusing HTML and find the list below, which just about anybody could update, without knowing one stitch of HTML.


<UL>


<!-- ENTER DATA BELOW! -->
<!-- ENTER DATA BELOW! -->
<!-- ENTER DATA BELOW! -->



<li> Aug 1 9am to noon Randal [local]
<li> Aug 1 noon to 4pm Aird
<li> Aug 4,5 and 6 Randal [Sunshine coast]
<li> Aug 20 to 22 Gerry [ Alert Bay]
<li> Aug 25 Shawn [Penticton]
<li> Sept 4,5 and 6 Randal [Portland]
<li> Sept 11 to 17 Ken [ Reno]
<li> Sept 18 to 20 Hans [ Prince George]
<li> Oct 9 to 11 Hans [Merrit/Quilchina]



<!-- ENTER DATA ABOVE! -->
<!-- ENTER DATA ABOVE! -->
<!-- ENTER DATA ABOVE! -->


</UL>

_________________
Air Traffic Control Game


Top
 Profile  
Reply with quote  
 Post subject: grin...
PostPosted: Wed Aug 04, 2004 7:23 am 
Offline
Initiate
Initiate

Joined: Tue Mar 25, 2003 5:49 pm
Posts: 85
Nice solution! Sorry if my "solution" threw you for a loop! (pun intended)

I have one question. It is easy for programmers to understand what "data" means. Why do you use "Enter Data Here" instead of something like "Enter Flight Here", "Enter Departure Time Here", "Enter Destination Here"?

I tend to try and think long term and if you are already putting a comment in the HTML to indicate where to update things, wouldn't it be useful long term to be more specific with what data should go in the commented areas? A year down the road, someone completely unaware of how this web page is set up to work will be in charge of updating it.

tryn


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Aug 04, 2004 7:17 pm 
Offline
Brown Belt
Brown Belt

Joined: Tue Jan 07, 2003 4:38 am
Posts: 303
Smart thinking. I'll do just that. Thanks for your replies.

K-K-Ken

_________________
Air Traffic Control Game


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group