Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
HTML Frames and URL Link Problem.
Old 11-17-2007, 12:56 PM HTML Frames and URL Link Problem.
Novice Talker

Posts: 12
Name: Alan
Trades: 0
I’ve built a simple web site and I have a problem.

When you click on a link in the left frame it opens the link in the main section of the page like it’s supposed to but the URL stays the same. So no matter what link you click, unless you open the link in a new page the URL remains the same (the main index.htm file)

For example if I click on “Family Pictures” or “Photography” the URL in the address line remains www.thelamberts.com

This is a problem because I would like to be able to send links to people from time to time.

How can I correct this problem? Is there a bit of code I can add?


Here’s the site
http://www.thelamberts.com
__________________
Alan

Please login or register to view this content. Registration is FREE
alambert is offline
Reply With Quote
View Public Profile Visit alambert's homepage!
 
 
Register now for full access!
Old 11-17-2007, 01:19 PM Re: HTML Frames and URL Link Problem.
blue-dreamer's Avatar
King Spam Talker

Posts: 1,222
Location: Middle England
Trades: 0
Welcome to WMT

If you want the URL to be different for each page you will need to ditch the frames. In fact it's not generally a good idea to build a site using frames for a lot of reasons. The problem you have found is just one of them.
blue-dreamer is offline
Reply With Quote
View Public Profile
 
Old 11-17-2007, 01:30 PM Re: HTML Frames and URL Link Problem.
Novice Talker

Posts: 12
Name: Alan
Trades: 0
I thought you might say that. What do you suggest? I mostly want to post articles like howtos and recipes on the site but would like each article to be its on file. I started the site with out frames, but if I have 10 articals and the are each individual pages and I decide to update something in the header I have to change 10 pages. With frames I have just change the top frame and I’m done. Is there another way to do this?

I’m using Dreamweaver to build the site.
__________________
Alan

Please login or register to view this content. Registration is FREE
alambert is offline
Reply With Quote
View Public Profile Visit alambert's homepage!
 
Old 11-17-2007, 04:12 PM Re: HTML Frames and URL Link Problem.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Server side includes (SSI) or scripted includes (ASP, PHP etc)
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-17-2007, 07:14 PM Re: HTML Frames and URL Link Problem.
Novice Talker

Posts: 12
Name: Alan
Trades: 0
An examples or sample code anywhere thats not overly complex?
__________________
Alan

Please login or register to view this content. Registration is FREE
alambert is offline
Reply With Quote
View Public Profile Visit alambert's homepage!
 
Old 11-17-2007, 07:41 PM Re: HTML Frames and URL Link Problem.
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
As a simple example: If you web server supports php, put the content before what is unique in header.php and what is after what is unique in footer.php

<?php
include_once("header.php");
?>

Individual page content


<?php
include_once("footer.php");
?>
joder is offline
Reply With Quote
View Public Profile
 
Old 11-17-2007, 07:58 PM Re: HTML Frames and URL Link Problem.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Funnily enough I do

<self-promo>
http://www.candsdesign.co.uk/articles/coding/includes/
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-18-2007, 07:26 PM Re: HTML Frames and URL Link Problem.
Novice Talker

Posts: 12
Name: Alan
Trades: 0
Once I add an include to a page dreamweaver only shows that page in the design area. Anyway to make it show the rest of the page
__________________
Alan

Please login or register to view this content. Registration is FREE
alambert is offline
Reply With Quote
View Public Profile Visit alambert's homepage!
 
Old 11-18-2007, 10:31 PM Re: HTML Frames and URL Link Problem.
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
Show some code.
joder is offline
Reply With Quote
View Public Profile
 
Old 11-18-2007, 11:09 PM Re: HTML Frames and URL Link Problem.
Novice Talker

Posts: 12
Name: Alan
Trades: 0
Heres some simple sample code and a better idea of what happens. in dreamweaver I see the the 2 cells in the design section. As soon as I insert <?php require_once('left.php'); ?> I only see the contents of left.php and can no longer edit the file in the design section of dreamweaver. This means in order to change the contents of the page I have to remove the <?php require_once('left.php'); ?>, edit, then put it back. That is if I want to edit in design mode.

This is left.php
<body>
<table width="100" border="0">
<tr>
<td width="87"><p><a href="1.php">1</a></p>
<p><a href="2.php">2</a></p>
<p>&nbsp;</p></td>
</tr>
</table>
</body>
</html>


This is 1.php
<body>
<table width="250" border="0">
<tr>
<td><p>
<?php require_once('left.php'); ?>
</p>
<p>&nbsp;</p></td>
<td>Display 1</td>
</tr>
</table>
</body>
</html>

This is 2.php
<body>
<table width="250" border="0">
<tr>
<td><p>
<?php require_once('left.php'); ?>
</p>
<p>&nbsp;</p></td>
<td>Display 2</td>
</tr>
</table>
</body>
</html>
__________________
Alan

Please login or register to view this content. Registration is FREE

Last edited by alambert; 11-18-2007 at 11:11 PM..
alambert is offline
Reply With Quote
View Public Profile Visit alambert's homepage!
 
Old 11-18-2007, 11:21 PM Re: HTML Frames and URL Link Problem.
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
<html> and <body> go at the top of the page once.

</body> and </html> go at the bottom of the page once.

If left.php were included the first thing in 1 or 2.php then it would have the beginning <html> and <body>

In left.php remove any reference to the body and html tags.
joder is offline
Reply With Quote
View Public Profile
 
Old 11-24-2007, 08:32 PM Re: HTML Frames and URL Link Problem.
Novice Talker

Posts: 12
Name: Alan
Trades: 0
Thanks for your input folks! I converted the site from frames to PHP with INCLUES. Works much better and I think it looks better too!

My problem with Dreamweaver allowing me to edit in Design view turned out to be a formatting problem with the PHP code. You would think Dreamweaver would format its on code in such away that this wouldn’t happen! Then again it was probably something I wasn’t doing right

Anyway take a look at the updated site and let me know what you think.

http://www.thelamberts.com

Thanks again,
Alan
__________________
Alan

Please login or register to view this content. Registration is FREE
alambert is offline
Reply With Quote
View Public Profile Visit alambert's homepage!
 
Old 11-26-2007, 04:11 AM Re: HTML Frames and URL Link Problem.
Harlequin's Avatar
Extreme Talker

Posts: 166
Name: Mick
Location: Tenerife
Trades: 0
Hi alambert, guys

Something I use to resemble frames but not actually using frames is the little known CSS selector: overflow

It places a scroll bar down the side if the content exceeds the predefined height and tidies up a page that looks really long without it as a lot of users do not like scrolling through a long page.
Harlequin is offline
Reply With Quote
View Public Profile Visit Harlequin's homepage!
 
Reply     « Reply to HTML Frames and URL Link Problem.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.46160 seconds with 12 queries