----- Original Message ----- From: "Jennifer Severn"

I have a site under construction which has a footer in a frame. The footer contains a string of text links. The problem is that although the links work fine, the page title does not change upon opening the new page. See http://www.indigoedge.com.au/4w3/html/festival_2006.html
Does anyone have a clue how to fix this?

The page title on a framed site will always be the title of the enclosing frame. But you can change the title using JavaScript. If you have a link in a footer frame loading a page into an upper frame, you need to make your link call some JavaScript to (i) load the new page and (ii) change the enclosing frame title

I'm a bit rusty nowadays but here's a sketch of what you have to do.

Name the frames:

<frameset rows="2">
<frame src="mainframe.htm" name="main">
<frame src="navframe.htm" name="nav">
</frameset>

Put some script in the <head> of the nav frame

<script>
function link(src, title) {
 main.src=src;
 parent.title=title;
}

Change the links:

<a href="JavaScript:link('home.htm','My Home Page');">Home</a>

You can improve on this, for instance you might worry about your links not working if JS is disabled so add a return(True); to the function and make the link:

<a href="home.htm" target="main" onClick="Javascript:return(link....

This will work either way but the title will only change if JS is enabled.

And I'm sure everyone will now explain why you should be using layers or divs or even a table instead of frames for this!

Bj

____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: archive@jab.org
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to