Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Displaying "Main" page in Browser Title Bar

Posted on 1999-07-12
18
Medium Priority
?
251 Views
Last Modified: 2013-12-24
How do I display the name of the "Main" page in the browser title bar when using frames (created using FP98)??

Thanks
0
Comment
Question by:NRackham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
  • 2
  • +4
18 Comments
 
LVL 9

Expert Comment

by:TTom
ID: 1868055
You can't.  The title which is displayed will currently be the title of the frameset page.

(There is a possibility that this property can be scripted in IE, but it is SUPPOSED to be read only.  If that is true, you might try inserting some JavaScript in your Main page which changes the title of the frameset doc, e.g. <body onload="parent.title = self.title">.  Don't know if it will work.)

Tom
0
 

Author Comment

by:NRackham
ID: 1868056
Tom

Tried the above but to no avail, I thought about the using the title tag of the frameset being = to the title of the main page but I'm having trouble with the syntax. Any thoughts?




0
 
LVL 9

Expert Comment

by:TTom
ID: 1868057
Don't think much of the possibilities for success.  As I mentioned, the 'title' property is (currently) supposed to be read only.  Any solution at all which changes it will have massive browser compatibility problems.

As long as the main page will be changeable, you will not be able to match the window title to anything other than the title of the frameset.

Sorry,

Tom
0
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 

Expert Comment

by:mbodamer
ID: 1868058
I am not totaly sure what you are asking.  If you want the title to change with the main page is changed in the frame then I dont't think it is possible.  If you want the initial frameset page to display a title of coarse it is the title tag.  You can name all the changing pages but the title will not change with ther page change.
0
 
LVL 3

Expert Comment

by:messentary
ID: 1868059
When in FrontPage, click on Frames Page HTML at the bottom.  In the HTML, change the title:

<title>what it says now</title>
 
to <title>what you want it to say</title>

This will not affect anything else navigation.

Unless you wanted to display the name of each page that is loaded, that is the only thing you can do.  There is a good site with free javascripts you can use that can do great things like scroll your page names in the status bar.  The URL is  http://www.draac.com.  They have alot of other great things as well
0
 

Author Comment

by:NRackham
ID: 1868060
Thanks Tom maybe I can't have what I want, oh well!!
-----------------
mbodamer, What I want is for the frameset title to display the title of the current "main" page, so that when ever the main page changes the title bar changes to reflect the title of the new page. Simple request but possibly not as easy as I first thought. If you can help I'd appreciate it but having discussed this with TTom, maybe it's not possible.
----------------
messentary

Not a bad suggestion re page title in the scrollbar area. maybe a solution but not exactly what I was looking for.

Nick


Regards Nick
0
 
LVL 4

Expert Comment

by:brigmar
ID: 1868061
Well, think I went thru this before...
IE let's you write to the document.title... so...

for each page that you want to update the window title, add the following javascript into the header:

<script language="javascript"><!--
function doOnload()
{
 top.document.title = document.title;
}
// --> </script>

and for the <body> of each document.... add this...

onload="doOnload()"

That'll work for IE4 upwards, so you can have half your cake.

hth

Brian
0
 

Author Comment

by:NRackham
ID: 1868062
Brian,

Thanks for the above. I'm now off for a week so I'll try it when I get back.

Thanks

Nick
0
 
LVL 3

Expert Comment

by:fibdev
ID: 1868063
Change the title of the frameset page to match that of the main frame.
0
 
LVL 3

Expert Comment

by:davlun20080
ID: 1868064
If your server supports CGI,you may be able to reload the entire page with a new frameset, passing the sources of the non-changing frames in your script.  This is messy in that it requires a reload of your frameset each time the main page changes, but it would solve your problem I think.
0
 

Author Comment

by:NRackham
ID: 1868065
Brigmar,

Excellent, just what I wanted, Many thanks. Please post as an answer.

Nick
0
 
LVL 4

Accepted Solution

by:
brigmar earned 200 total points
ID: 1868066
Well, think I went thru this before...
IE let's you write to the document.title... so...

for each page that you want to update the window title, add the following javascript into the header:

<script language="javascript"><!--
function doOnload()
{
 top.document.title = document.title;
}
// --> </script>

and for the <body> of each document.... add this...

onload="doOnload()"

That'll work for IE4 upwards, so you can have half your cake.

hth

Brian
0
 

Author Comment

by:NRackham
ID: 1868067
I don't know if this can be added to the question or if I'll have to post as a seperate question but can I have the page name displayed in the address bar as well? At the moment it seems that what ever page I'm in the address is always Http://sitename/default.htm

I'd like to display the page name of the "main" page in the address bar ie http://sitename/news.htm or pressreleases.htm etc

Any thoughts

Nick
0
 

Author Comment

by:NRackham
ID: 1868068
Thanks Brian,

Please see my comment posted just after your answer. Is it possible?

Nick
0
 
LVL 4

Expert Comment

by:brigmar
ID: 1868069
as long as the pages are all on the same domain...

change the line in the javascript to read :

top.document.title = top.document.location + ' - ' + document.title;

suck it and see...

Brian
0
 

Author Comment

by:NRackham
ID: 1868070
Hi Brian

Thanks for the extra code for the title bar. What I really wanted was to change the address bar as well, not have the url of the page in the title bar. Does that make sense?

Nick
0
 
LVL 4

Expert Comment

by:brigmar
ID: 1868071
Nick,

The address bar is the location of the top level document of the window. This would be the frameset document.
 The only way to change it is indirectly, by navigating to another URL, which would break your frameset.

Brian
0
 

Author Comment

by:NRackham
ID: 1868072
Brian,

Thanks,

Nick
0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
Suggested Courses

671 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question