<title> + js?

:) <br />
<br />
ok so i have 1 page which has a few child pages within it (iframes)<br />
<br />
I have a "<title>sitename | home</title>" on the parent page, but i need to be able to set the title status from one of the child pages. Is there any js that will allow me to do this?:confused:<!--content-->In the newest browsers you can change the document.title at any time.document.title = "whatever";<br />
<br />
In older browsers, you can only change the document.title while the document is still loading. Once the HEAD section is complete, the document.title becomes read-only.<!--content-->so if i remove all <title>...</title> tags from all pages, except the relevant child page, it will work?<br />
<br />
surely this js will run in the <head>...</head> anyway?<br />
<br />
edit: what i mean is, will only the parent pages <title> show on the browser?<!--content-->hmm. well i tried a few things and no, it's pooped.<br />
<br />
can i not set up something like:<br />
<br />
document.title="[titlevar]";<br />
<br />
on the parent page, and have the variable 'titlevar' set onLoad of the iframe?<br />
<br />
won't the parent page wait for it?<!--content-->Here is an example:<br />
<br />
frametitle.htm:<br />
<head><br />
<title>Frameset Title Test</title><br />
</head><br />
<frameset rows="50%,*"><br />
<frame name="f1" src=http://www.webdeveloper.com/forum/archive/index.php/"f1a.htm"><br />
<frame name="f2" src=http://www.webdeveloper.com/forum/archive/index.php/"blank.htm"><br />
</frameset><br />
f1a.htm:<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"f2a.htm">load next page</a><br />
f2a.htm:<br />
<script><br />
window.top.document.title = "TADA!";<br />
</script><br />
When you load frametitle.htm, the title is "Frameset Title Test". When you click the link in the top frame, the title will change to "TADA!" in NS 6 and IE 5.5. It will not change in NS 4. Those are the only browsers I have available for test.<!--content-->ah good news, thats great.<br />
<br />
I'll just set a standard title in there for load then (for older browsers)<br />
<br />
and i can use this on any subsequent iframe page. lovely thanks alot!;)<!--content-->
 
Back
Top