hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
html problems :(

 
Reply to topic    hacker.org Forum Index » The Hacker's Server View previous topic
View next topic
html problems :(
Author Message
Downstairs



Joined: 19 Aug 2008
Posts: 16
Location: Sweden

Post html problems :( Reply with quote
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
Sun Oct 26, 2008 10:05 am View user's profile Send private message Visit poster's website MSN Messenger
Grand_Master



Joined: 18 Aug 2008
Posts: 80
Location: Sweden

Post Reply with quote
I don't really understand what your problem is. Are you doing iframes? What did you paste?

_________________
"Learn, grow, teach."
Sun Oct 26, 2008 10:16 am View user's profile Send private message Send e-mail MSN Messenger
Downstairs



Joined: 19 Aug 2008
Posts: 16
Location: Sweden

Post Reply with quote
no i using <table>

I've tried with:

Code:

<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
Sun Oct 26, 2008 10:31 am View user's profile Send private message Visit poster's website MSN Messenger
m!nus



Joined: 28 Jul 2007
Posts: 202
Location: Germany

Post Reply with quote
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
Sun Oct 26, 2008 2:27 pm View user's profile Send private message
Downstairs



Joined: 19 Aug 2008
Posts: 16
Location: Sweden

Post Reply with quote
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
Sun Oct 26, 2008 6:17 pm View user's profile Send private message Visit poster's website MSN Messenger
kilkenny



Joined: 25 Oct 2008
Posts: 5

Post Reply with quote
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:
<?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.
Sun Oct 26, 2008 7:46 pm View user's profile Send private message
therethinker



Joined: 28 Mar 2008
Posts: 144
Location: #hacker.org on Freenode

Post Reply with quote
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.
Sun Oct 26, 2008 8:48 pm View user's profile Send private message AIM Address
canine



Joined: 14 Sep 2008
Posts: 189

Post Reply with quote
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.
Sun Oct 26, 2008 11:52 pm View user's profile Send private message
therethinker



Joined: 28 Mar 2008
Posts: 144
Location: #hacker.org on Freenode

Post Reply with quote
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.
Mon Oct 27, 2008 6:47 pm View user's profile Send private message AIM Address
Downstairs



Joined: 19 Aug 2008
Posts: 16
Location: Sweden

Post Reply with quote
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 Smile

_________________
::Downstairs
Mon Oct 27, 2008 7:01 pm View user's profile Send private message Visit poster's website MSN Messenger
canine



Joined: 14 Sep 2008
Posts: 189

Post Reply with quote
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.
Mon Oct 27, 2008 9:12 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    hacker.org Forum Index » The Hacker's Server All times are GMT
Page 1 of 1

 
Jump to: 
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.