html problems :(
- Downstairs
- Posts: 16
- Joined: Tue Aug 19, 2008 9:18 am
- Location: Sweden
- Contact:
html problems :(
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?
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
- Grand_Master
- Posts: 81
- Joined: Mon Aug 18, 2008 3:07 pm
- Location: Sweden
- Downstairs
- Posts: 16
- Joined: Tue Aug 19, 2008 9:18 am
- Location: Sweden
- Contact:
no i using <table>
I've tried with:
hope you understand..
if I use frames the page will be "divided" and that's what I try to avoid
I've tried with:
Code: Select all
<table>
<tr>
<td href="file.html">
</td>
</tr>
<table>
if I use frames the page will be "divided" and that's what I try to avoid
::Downstairs
- Downstairs
- Posts: 16
- Joined: Tue Aug 19, 2008 9:18 am
- Location: Sweden
- Contact:
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
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.
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');
?>
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.
-
- Posts: 144
- Joined: Fri Mar 28, 2008 11:29 pm
- Location: #hacker.org on Freenode
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.
(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.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.
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.
-
- Posts: 144
- Joined: Fri Mar 28, 2008 11:29 pm
- Location: #hacker.org on Freenode
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.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.
- Downstairs
- Posts: 16
- Joined: Tue Aug 19, 2008 9:18 am
- Location: Sweden
- Contact:
Well, depends on what you're doing.therethinker wrote: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.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.
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.