Changing Browser Title
Hrm...I can't seam to get it to work....maybe I didn't explain my situation clearly enough
I setup a test url at
I want the document title to be "Yahoo!" (the <title> of the bottom frame).
If the bottom fram always changes .... how can I set the title of the web browser to the title of the bottom frame?
Thanks in advance.
Jkd's solution won't work because document.title is a read-only property.
Anyone think of anything else? This should be simple! Heh.
document.title is mutable in IE4+/NS6. Try it, save this file onto your hard drive and view it:
It works fine.
<a href="#" onclick="document.title='Overwritten title';return true">Click to Change Document's Title</a>
As jkd implied and Rips discovered, Netscape 4+ doesn't allow you to change the document's title. If you would like more information, see "The Title Property" snippet at my site.
Insofar as your problem, your only solution may be to reverse your frames so that the static frame is on the bottom.
Okay, so why does this not work.
<FRAMESET FRAMEBORDER=0 FRAMESPACING=0 BORDER=0 ROWS="50,*">
<FRAME SRC="http://www.yahoo.com" onLoad="document.title=frames.document.title;return true">
If i do an onLoad="document.title='dsfsdfsd';return true"
I can get dsfsdfsd as the title...but not the Yahoo! title.
Does the phrase "Access is denied" ring a bell? If you put an alert in the onLoad (alert(document.title)) you will see a blank. If you add a title to your page <title>test</title> the alert will display 'test' -- anything else comes up with the access message. The implication? -- you do not have rights to put someone else's title on your page -- offhand, I would say that is a good thing.
Creole: his numbering is correct since he is attempting to assign yahoo's title (frame) to the entire document.
Thanks for your help. If I reversed the frames (put the static page on bottom), is it possible to accomplish what I'm trying to do? Or is there a way to go out and manually parse the document for the <title> flag?