Page 1 of 1

Change the page title when a single frame is changed?

Posted: Mon Jan 12, 2009 12:12 pm
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

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

Posted: Mon Jan 12, 2009 12:53 pm
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

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

Posted: Mon Jan 12, 2009 1:02 pm
by me666
yes sorry, the html <title></title> tag used for the page title in the ie bar
thanks

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

Posted: Mon Jan 12, 2009 3:04 pm
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.

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

Posted: Tue Jan 13, 2009 11:14 am
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

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

Posted: Tue Jan 13, 2009 11:56 am
by andyhoneycutt
You can modify the title using javascript with:

Code: Select all

document.title = "New Page Title";

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

Posted: Tue Jan 13, 2009 1:23 pm
by me666
ok thank you, think ive seen this befor
thanks 4 the help :D
leo