Click to See Complete Forum and Search --> : Naming PopUp Window


JJTitus
12-02-2002, 05:52 PM
I made a window pop up but it says Untitled Document in the Titlebar

How do I add a title to it?

Thanks

Jonathan

Ryan
12-02-2002, 06:55 PM
if the window contains an already made html document, you would add the <title></title> tags in the <head></head> tags.

if you're writing code to the window through javascript, add the <title></title> tags in between the <head></head> tags to the code.

gil davis
12-02-2002, 06:59 PM
Did you load a HTML page into the popup?

<head>
<title>Your Title Goes Here</title>
...
</head>

Or are you using document.write()?

popup.document.write("<title>Your Title Goes Here</title>");

Or (this may be position and browser dependent)

popup.document.title = "Your Title Goes Here";

Charles
12-03-2002, 05:49 AM
The title property of the document object is supposed to be read-only. (See http://developer.netscape.com/docs/manuals/js/client/jsref/document.htm#1194011.) So, I wouldn't use the direct JavaScript method.

JJTitus
12-03-2002, 08:09 AM
Alright I figured it out. I figured that the name of the HTML file I used would show up there, but I thought it had a name and wasn't showing up. When I looked at it again today there was no title. So I figured it out. Thanks guys.

Jonathan