Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Titles and Frames

Titles and Frames
Thread Tools
Mac Enthusiast
Join Date: Apr 2003
Status: Offline
Reply With Quote
Jul 25, 2003, 11:15 AM
 
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
Reply With Quote
Jul 25, 2003, 11:17 AM
 
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
Reply With Quote
Jul 25, 2003, 11:53 AM
 
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
Reply With Quote
Jul 25, 2003, 12:07 PM
 
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
Reply With Quote
Jul 25, 2003, 12:32 PM
 
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
Reply With Quote
Jul 26, 2003, 12:19 AM
 
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
Reply With Quote
Jul 26, 2003, 05:22 PM
 
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
Reply With Quote
Jul 27, 2003, 02:25 AM
 
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
Reply With Quote
Jul 27, 2003, 02:35 AM
 
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
Reply With Quote
Jul 27, 2003, 02:49 AM
 
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
Reply With Quote
Jul 27, 2003, 02:53 AM
 
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]
     
   
Thread Tools
Forum Links
Forum 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 On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:14 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2