Change the page title when a single frame is changed?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
me666
Forum Commoner
Posts: 87
Joined: Wed Oct 08, 2008 5:04 pm

Change the page title when a single frame is changed?

Post by me666 »

I have a page the displays 3 frames, when you click a link in frame 2 it changes the page in frame 3 and keeps frame 1 the same, at the moment the title is stored on the index page holding all 3 frames but when frame 3 is changed i want the title to be changed. I have tried putting a

Code: Select all

<?php print"$newtitle"; ?>
in the index page and then in all other pages to be displayed in frame 3

Code: Select all

$newtitle = title;
but this dosen't seam to work, does any1 have any ideas please?
Thanks in advance :D
Leo
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: Change the page title when a single frame is changed?

Post by andyhoneycutt »

Are you talking about the html <title> tag or some other means by which you identify to the user which page they are on?

-Andy
me666
Forum Commoner
Posts: 87
Joined: Wed Oct 08, 2008 5:04 pm

Re: Change the page title when a single frame is changed?

Post by me666 »

yes sorry, the html <title></title> tag used for the page title in the ie bar
thanks
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: Change the page title when a single frame is changed?

Post by andyhoneycutt »

You'll be best off with a javascript approach I would think, since the frameset doesn't actually reload, only the frames within it.
me666
Forum Commoner
Posts: 87
Joined: Wed Oct 08, 2008 5:04 pm

Re: Change the page title when a single frame is changed?

Post by me666 »

ah ok, the only problem is, im not to familiar with java script :$ any chance u can maybe give me some ideas please?
thanks
leo
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: Change the page title when a single frame is changed?

Post by andyhoneycutt »

You can modify the title using javascript with:

Code: Select all

document.title = "New Page Title";
me666
Forum Commoner
Posts: 87
Joined: Wed Oct 08, 2008 5:04 pm

Re: Change the page title when a single frame is changed?

Post by me666 »

ok thank you, think ive seen this befor
thanks 4 the help :D
leo
Post Reply