It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Quick Question.

Quick Question.

Postby dflynn on Thu Dec 20, 2007 8:36 pm

Hey guys,

I'm redesigning the website for my father's business.
I'm going CSS/HTML this time as opposed to tables.

Anyway, the question;

On the site there is a list of events that the company will be attending. I was wondering if there is a way to have the site load the list on it's own instead of having copy and paste the list onto each page.

Any ideas?
Thanks in advance.
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada

Postby flabbyrabbit on Thu Dec 20, 2007 9:19 pm

you could use:
Code: Select all
<?php
include('page.html');
?>


Which will put page.html where ever the code is. So when you update page.html it will change on all of the pages.

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby dflynn on Thu Dec 20, 2007 9:48 pm

I don't quite understand how this works.
The list is only 160px down the left side of the site.
using

<?php
include('page.html');
?>

Will that load everything on page.html into just that Div layer?
So if page.html is just a list, no images or any other text, then that would load into the Div Layer on other pages?
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada

Postby flabbyrabbit on Thu Dec 20, 2007 9:54 pm

Yeah, what it does it just puts all the code from page.html, where u added the include. So if the include is in a div text or what ever will stay in that div.

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby dflynn on Thu Dec 20, 2007 9:56 pm

Ok, thanks a lot flabbyrabbit
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada

Postby dflynn on Thu Dec 20, 2007 10:05 pm

I found out (the hard way) that my dad's hosting plan doesn't support php. I'm pretty disappointed now. but is there a way to do this with javascript possibly?
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada

Postby flabbyrabbit on Thu Dec 20, 2007 10:09 pm

Oh i don't think so, but i will have a look. What languages does your host support?

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby dflynn on Thu Dec 20, 2007 10:13 pm

Because the company doesn't do any business online, the site is mainly there for people who already know about us. The hosting plan is practically file storage and email accounts. So it will only support the basics, html, css, javascript.
What it doesn't support: Php, perl, cgi-bin, asp asp.net, mySQL.
So I'm limited in that way.
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada

Postby flabbyrabbit on Thu Dec 20, 2007 10:20 pm

You could use IFrames, which just shows another file.
Code: Select all
<iframe sre="www.google.com" height=100 widht=100></iframe>

You may need to change the widths and heights to fit your needs but it should work.

Flabby Rabbit
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby dflynn on Thu Dec 20, 2007 10:26 pm

hmm interesting. I've never used iframes before.

Thanks again Flabbyrabbit
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada


Who is online

Users browsing this forum: No registered users and 9 guests

cron