change title of parent window

T

Treetop

is there a way to change the <title> tag from a parent window from a
child window in frames?
 
G

Grant Wagner

Treetop said:
is there a way to change the <title> tag from a parent window from a
child window in frames?

top.document.title = 'My new title';

Note that some browsers (such as Netscape 4.x) allow this assignment,
but do not change the text that appears on the titlebar of the Web
browser and do not actually change the value of document.title (in
Windows, it may in other operating systems).

The frameset needs to come from the same domain as the page from which
you are trying to change the title for it to work.

The line above was tested and is working in IE6SP1, Mozilla Firebird 0.7
and Opera 7.23.

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 
M

Macamba

Treetop said:
is there a way to change the <title> tag from a parent window from a
child window in frames?
Treetop,

Don't think so. I could imagine you be able to change the title of a
document with it's DOM. But the page on the client needs to be refreshed
before you will see anything change.

Mover info over the Document Object Model, see http://www.w3c.org/DOM/

To quote the mentioned page:
"The Document Object Model is a platform- and language-neutral interface
that will allow programs and scripts to dynamically access and update
the content, structure and style of documents."

Macamba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top