change title of parent window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Treetop

    #1

    change title of parent window

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



  • Grant Wagner

    #2
    Re: change title of parent window

    Treetop wrote:
    [color=blue]
    > is there a way to change the <title> tag from a parent window from a
    > child window in frames?[/color]

    top.document.ti tle = '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 <gwagner@agrico reunited.com>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *


    * Internet Explorer DOM Reference available at:
    *
    http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html


    Comment

    • Macamba

      #3
      Re: change title of parent window

      Treetop wrote:[color=blue]
      > is there a way to change the <title> tag from a parent window from a
      > child window in frames?
      >
      >
      >[/color]
      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

      Comment

      Working...