Closed Bug 9722 Opened 25 years ago Closed 25 years ago

Setting dialog caption using window.title doesn't work

Categories

(Core :: XUL, defect, P3)

All
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: cmanske, Assigned: hyatt)

Details

According to danm, the correct way to change the window caption or "title"
at runtime is document.title="My Title".
This currently yields a not-implemented error message.
David Hyatt noted that using document.title will append "-Mozilla" onto the
title. We understand about the security issue here, but that shouldn't be done
if the title is being set from a chrome shell. Having "-Mozilla" would look
very ugly on all our dialogs.
Status: NEW → ASSIGNED
Target Milestone: M9
Talk to hyatt and danm about this. I agree with their assesment that this
should really be a method on the window, not the document, when used for
a dialog caption. (The window has the "title" attribute that you set in the
XUL file now.)
Added myself to cc list.  I need this for two of the address book dialogs.
Yes the window does have a title that you can set from XUL.  However it does not
seem to work from JS.
Added danm to the cc: list in hopes that he'll take the bug :-)
Based on this thread:

news://news.mozilla.org/378D4321.40541BB3%40netscape.com

it seems like we should probably mark this bug as INVALID. Hyatt should
have window.title working RSN.

Charlie, does that sound okay?
Assignee: waterson → hyatt
Status: ASSIGNED → NEW
Summary: Setting window caption using document.title is not implemented → Setting window caption is not implemented
I just reassigned it so David will have a bug to mark fixed :)
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed.  Use window.title.
Status: RESOLVED → REOPENED
Thanks for your quick response, but unfortunately it isn't setting the title
in a dialog in the onload handler. I think its a timing/redraw issue. If I
break in your new code, everything looks great. But I noticed that the window
already displayed just before it hit the break point. I'm setting it in the
dialog's onload hander ("Startup()"), so as with autosizing to content
not responding to adding content, it is displayed too early?
To test it:
1. Load editor
2. Click on Table toolbar button (caret will be in the "Number of rows"
editbox
3. Delete the default "1" and type "0"
4. Click OK
This will cause an error dialog to display. The dialog caption should be
"Input Error", not "Netscape"
Resolution: FIXED → ---
Clearing Fixed resolution due to ReOpen of this bug.
Status: REOPENED → ASSIGNED
Summary: Setting window caption is not implemented → Setting dialog caption using window.title doesn't work
I can't test this bug, since the table dialog's text input fields won't let me
change the values, and since the Ok/Cancel buttons don't appear to be present on
the dialog (which is coming up at a ridiculous size).
Status: ASSIGNED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Fixed.  SetTitleFromXUL was buggy.
ermmm, following the steps from charlie's comment on 07/16/99
still results in an error dialog with the title 'Netscape'

what to do?
I think it works.  Let's wait until cmanske gets back from vacation, and he can
verify.
Sorry for spam, re-assigning phillip's QA contact XPToolkit/XPWidget bugs to
claudius due to restructure
Status: RESOLVED → VERIFIED
cmanske, I'm thinking this is okay, let me know if I'm wrong
You need to log in before you can comment on or make changes to this bug.