html problems :(

Discussion about hacker.org's server
Post Reply
User avatar
Downstairs
Posts: 16
Joined: Tue Aug 19, 2008 9:18 am
Location: Sweden
Contact:

html problems :(

Post by Downstairs »

I recently changed my friend's homepage that was based on <frames> to <table>.
Then I had this idea of pastleing a .html document into the page so it would be easier to edit the page later on, so instead of changing the index.html file I just have to change the extra.html file.

Anyone who have an idea on how this can be done?
::Downstairs
User avatar
Grand_Master
Posts: 81
Joined: Mon Aug 18, 2008 3:07 pm
Location: Sweden

Post by Grand_Master »

I don't really understand what your problem is. Are you doing iframes? What did you paste?
"Learn, grow, teach."
User avatar
Downstairs
Posts: 16
Joined: Tue Aug 19, 2008 9:18 am
Location: Sweden
Contact:

Post by Downstairs »

no i using <table>

I've tried with:

Code: Select all

<table>
<tr>
<td href="file.html">
</td>
</tr>
<table>
hope you understand..
if I use frames the page will be "divided" and that's what I try to avoid
::Downstairs
User avatar
m!nus
Posts: 202
Joined: Sat Jul 28, 2007 6:49 pm
Location: Germany

Post by m!nus »

may i laugh now?

in general i think that learning by doing is good, but if you have absolutely no clue you should get some tutorial first
User avatar
Downstairs
Posts: 16
Joined: Tue Aug 19, 2008 9:18 am
Location: Sweden
Contact:

Post by Downstairs »

m!nus wrote:may i laugh now?

in general i think that learning by doing is good, but if you have absolutely no clue you should get some tutorial first
oh, thanx for the advice. don't know if I ever could solve this problem without your answer
::Downstairs
kilkenny
Posts: 5
Joined: Sat Oct 25, 2008 12:08 pm

Post by kilkenny »

What u r tryin to do requires either PHP or AJAX.
PHP is a server-sided scripting language and ajax is based on java-script.

The simple PHP-code to include a file would be

Code: Select all

<?php
include('file.htm');
?>
You could also do it with the C-like functions fopen(), fgets() and fclose().
BUT: PHP requires a webserver that interprets the scripts.

Try to learn some basic PHP first.

Or if u wanna do it with AJAX read tutorials about that.

AND PLEASE: NEVER EVER DO DESIGNS WITH TABLES. Learn CSS and read about barrier-free webdesign.
therethinker
Posts: 144
Joined: Fri Mar 28, 2008 11:29 pm
Location: #hacker.org on Freenode

Post by therethinker »

kilkenny: as bad as tables are, people who are told not to use them tend to use alternate elements in a similar, poor manner. Its only slightly better than the table-based layout semantics-wise; but it is rarely cross-browser.
(I'm recommending that he sticks with the tables)

And I'd be wary using AJAX in a normally static page. I'm also not sure if he has access to PHP or another server-side processor.

Anyway: I'd keep the <frame>'s & possibly use <iframe>, if it helps. Like tables, its terrible design practice, but it will accomplish what you need to do without any extra technology.
canine
Posts: 190
Joined: Sun Sep 14, 2008 5:38 am

Post by canine »

therethinker wrote:kilkenny: as bad as tables are, people who are told not to use them tend to use alternate elements in a similar, poor manner. Its only slightly better than the table-based layout semantics-wise; but it is rarely cross-browser.
(I'm recommending that he sticks with the tables)

And I'd be wary using AJAX in a normally static page. I'm also not sure if he has access to PHP or another server-side processor.

Anyway: I'd keep the <frame>'s & possibly use <iframe>, if it helps. Like tables, its terrible design practice, but it will accomplish what you need to do without any extra technology.
One should use tables where they would logically be used, that is, to make a table of data. Anything else is crap. Of course it's still possible to make a bad webpage, but it's less likely.

I'd recommend SSI instead of PHP, if all you're doing is including a file within another, and you usually have access to it, including times when you don't have access to PHP.
therethinker
Posts: 144
Joined: Fri Mar 28, 2008 11:29 pm
Location: #hacker.org on Freenode

Post by therethinker »

canine wrote: One should use tables where they would logically be used, that is, to make a table of data. Anything else is crap. Of course it's still possible to make a bad webpage, but it's less likely.
Although I said I would normally agree, if you just end up nesting div's to create the same effect, you're not doing anything better.
User avatar
Downstairs
Posts: 16
Joined: Tue Aug 19, 2008 9:18 am
Location: Sweden
Contact:

Post by Downstairs »

Thanks for the great answers!
I don't want to learn php right now since I'm learning C++.
My current web hotel don't support php so I'll stick to iframes and div until I find a better solution :)
::Downstairs
canine
Posts: 190
Joined: Sun Sep 14, 2008 5:38 am

Post by canine »

therethinker wrote:
canine wrote: One should use tables where they would logically be used, that is, to make a table of data. Anything else is crap. Of course it's still possible to make a bad webpage, but it's less likely.
Although I said I would normally agree, if you just end up nesting div's to create the same effect, you're not doing anything better.
Well, depends on what you're doing.

I usually have three high level div's, and that's the extent of it. It's better than tables because div only implies division, while table implies data.
Post Reply