 |
 |
Titles and Frames
|
 |
|
 |
|
Mac Enthusiast
Join Date: Apr 2003
Status:
Offline
|
|
Hi, I'm rather new to html and designing web sites. I organized my site using two frames (a left frame for navigation, and a main frame). Currently, no matter which page is in the main frame, the title at the top of the browser always reads "Untitled" and the URL is always the home page address. Is there a way to display the title and the address of whichever page is being viewed the main frame? Thanks a lot.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2003
Location: columbus, oh
Status:
Offline
|
|
The main 'index.html' file needs a title.
Ex:
[html]
[head]
[title]whatever you choose to add here[/title]
[/head]
[body][/body]
[/html]
Just replace '[ ]' with the '< >' characters.
Hope that helps!
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2003
Status:
Offline
|
|
Originally posted by jszrules:
Is there a way to display the title and the address of whichever page is being viewed the main frame? Thanks a lot.
I haven't used frames in years, but I think the answers are no and no. You might want to reconsider using frames at all. What is your logic/reasoning behind using them?
|
|
I'm what Willis was talking about.
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Apr 2003
Status:
Offline
|
|
Originally posted by arson:
I haven't used frames in years, but I think the answers are no and no. You might want to reconsider using frames at all. What is your logic/reasoning behind using them?
If I didn't use frames, then I would have to go through every page and update each of them if I ever want to make a change in the left navigation menu.
Thanks to OptimusG4...that got rid of the "Untitled" title, but the new title is still shown no matter what page is in the main frame. I'm still trying to figure out if there is a way to have the title and URL change with whatever is in the main frame (I am hoping that Arson is wrong!! Although it doesn't look like that is the case...) Thanks again in advance.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2003
Status:
Offline
|
|
I'm never wrong!
If you don't want to update the navigation on every page when you change it, I'd suggest using either server-side includes, or a scripting language like php to include the header on each page. Then you'd only have one copy of the navigation code and when updated, all pages would be updated automatically.
to do a server-side include (needs to be enabled, and your files may need to end in .shtml), you'd make your nav file and then reference it like this in your main document:
[!--#include virtual="/nav.inc" --]
replace the [ and ] with < and >
|
|
I'm what Willis was talking about.
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2003
Location: columbus, oh
Status:
Offline
|
|
Originally posted by jszrules:
If I didn't use frames, then I would have to go through every page and update each of them if I ever want to make a change in the left navigation menu.
Thanks to OptimusG4...that got rid of the "Untitled" title, but the new title is still shown no matter what page is in the main frame. I'm still trying to figure out if there is a way to have the title and URL change with whatever is in the main frame (I am hoping that Arson is wrong!! Although it doesn't look like that is the case...) Thanks again in advance.
OR you can use iFrames. My site, www.monkeyboycreation.net, uses them and no major updating for me...though I am constantly playing with it
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Nov 2002
Location: Japan
Status:
Offline
|
|
If you use a WYSIWYG, consider using templates. Then you update one page and all pages are updated.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Apr 2003
Status:
Offline
|
|
Originally posted by wrwjpn:
If you use a WYSIWYG, consider using templates. Then you update one page and all pages are updated.
Isn't that the same as using frames?
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Jul 2003
Location: San Jose
Status:
Offline
|
|
Originally posted by jszrules:
Isn't that the same as using frames?
W - what
Y - you
S - see
I - is
W - what
Y- you
G- get
it's an acronym to describe programs like dreamweaver and frontpage where you can design a webpage visually without having to write code.
so, what you see in the program is what you get in the web browser.
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Jul 2003
Location: San Jose
Status:
Offline
|
|
another easy way to get rid of the frames and not have to worry about updating your code on every page when a change is made is to use javascript...
place this piece of code inside the [head] of your pages:
Code:
[script type="javascript" language="text/javascript" src="navigation.js"][/script]
then use navigation.js as the source for all your main links:
Code:
//navigation.js
document.write('[a href=index.html]Home[/a]');
document.write('[a href=products.html]Products[/a]');
then whenever you need to make a change, you only have to update this one page and it will be reflected in all the ones that call it...
|
|
|
| |
|
|
|
 |
|
 |
|
Registered User
Join Date: Jul 2003
Location: San Jose
Status:
Offline
|
|
php is even easier, if you want to look into that as well...
Code:
[? include ("navigation.php"); ?]
then navigation.php can just be straight html
Code:
//navigation.php
[a href='index.php']Home[/a]
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|