Open Bug 386486 Opened 17 years ago Updated 2 years ago

Please put "The page at [address] says:" somewhere other than the alert dialog's titlebar, or remove it

Categories

(Core :: DOM: Core & HTML, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: krudtaa, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

Today we get a pretty much useless and counterintuitive forced title in alertboxes that says something like:

"The page at 'address' says:"

Alert boxes can be improved much IMHO:

I suggest the following implementation:

Let the developer control the title. 
Today the title gives little meaning to the enduser anyway.

I would like to do the following:

alert("My message to enduser here","My title to enduser here");

If the second parameter is used in the alert() function call then you
should put my titletext in the alertbox title area, and nothing else.

If you absolutely want to still force display the ugly titletext that is there today, then I suggest it is displayed in a tiny subtitle bar below the main title bar in the alertbox, or eventually a small bar at the end of the alertbox.

Would like to see the above implemented for:
alert()
confirm()
prompt()

This should be easy to implement and would make the UI a lot better for the endusers and developers.

Why force useless information to the enduser?
Why force useless titles to the enduser?

Why not make it easier for the developers to control the messages and text displayed to the the endusers?

Happy coding :-)

Reproducible: Always

Steps to Reproduce:
Se details.
The title isn't overridable in order to make it less spoofable.
  
Did you read my post?

If you did, then I think you missed my point.

It is NOT overridable beacuse of how the alertbox is implemented by Firefox developers, I belive.

Just displaying this in the title bar:

"The page at 'address' says:"

does not make it non spoofable.....

It just gives out some info to the enduser where the message is coming from.
Which is okay by me.. .. what is not okay, is where that message is placed.

....And current implementation just make it more confusing to the enduser, mostly since the title has nothing to do with what is actually given as a message further down in the alertbox.

Now, if we the developers could get control of what was displayed in the alertbox, confirmbox and prompt box then the title could be more descriptive and helpful for the enduser.

Then, the current text that Firefox today display in the title area could be displayed in another bar below the current titlebar, or eventually at the end of the alert, confirm or promptbox similar to status bar in main window.

Then the developers and endusers could benefit from a more intuitive UI and Firefox developers could still force the current title to the enduser, but in a place and in a way that does not make the alert, confirm and prompt boxes so little intuitive as it is today.

As a developer I would like to put something meaningful to the enduser in the title bar.
And I belive the enduser would like that as well.

If spoofing are the main issue here, which I belive, then it can be "avoided" in
a better way by putting in a separate "spoofing bar" below current titlebar or eventually at end of the popup similar to statusbar.

If Firefox implemented this, then it would only make Firefox better.

Please, please .... go into the thinktank and do a serious evaluation on the current implementation and consider my suggestions.

Regards
If you want to customize message boxes then you should use nsIPrompt interface, for example.
Arent that interface Mozilla compatible only....

From this link:
http://developer.mozilla.org/en/docs/xpcshell#Example
I found this text:
Prerequisites: You need your own build of Mozilla to use xpcshell. 

So if my enduser uses Safari or windows or Opera then it will not work?

If that is the case then I would rather prefer you change the current way
alert, confirm and prompt are working in order to make it work as I suggested.

Then the code would still work on other browsers, and eventually the other
browser engine developers would follow in your footsteps... :-)

The "The page at ... says:" thing was added in bug 298934 and bug 334893.  I think it's intended to ensure that users understand that the dialog comes from the web page and not from Firefox itself.  It might also help prevent spoofing, at least when we have bugs(??) that allow one page's dialog to appear in front of another page.  I'm a confused about this.

I find that I tend not to look at title bars when I use Windows, so maybe the Mac solution of putting the text inside the dialog would be more effective as an anti-spoofing measure ;)

Btw, the alert title doesn't get shown at all on Mac (bug 132279).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Alert boxes can be much improved → Please put "The page at [address] says:" somewhere other than the alert dialog's titlebar, or remove it
Blocks: sa15489
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
Hardware: PC → All
See also bug 386757, "Remove Firefox logo from javascript alert() sheets".
IMO it doesn't make sense to remove this message from the title bar for alert(), confirm(), and prompt().

Clearly this is meant as an anti-spoofing feature and this information is helpful to users to identify the source of a pop-up message.  The title bar is an appropriate place for this piece of information.

This sounds rather like an issue with the aesthetics of alert(), etc.  Many sites have implemented their own versions of this type of functionality using JavaScript and CSS.  This approach gives the developer full control of the dialog's appearance.
(In reply to comment #7)
> sites have implemented their own versions of this type of functionality using
> JavaScript and CSS.  This approach gives the developer full control of the
> dialog's appearance.

example:- 
http://extjs.com/deploy/dev/examples/message-box/msg-box.html

users hate applications using a std alert(), confirm(), prompt(), msgbox(), inputbox() etc. and it is a bad style of coding and really unprofessional.
To Biju

You said:

"users hate applications using a std alert(), confirm(), prompt(), msgbox(),
inputbox() etc. and it is a bad style of coding and really unprofessional."

Well.... when you say "bad style of coding" then just want to say that not every internet page/application is read only for the endusers.

I have developed several online applications using HTML and javascript, which typically earlier was an application running inhouse and not using HTML...

In these applications the developer typically want control over the messages sent to the endusers, and many times it is important to show this information/message in an "alert" like box which require that the enduser either confirm or cancel the alert before doing anything else.

I agree that for most typical websites these alerts should be used carefully, but to say "bad style of coding and really unprofessional" is kind of unprofessional to (in my opinion).... 
The internet is not black and white.

And I really do not like the way the alert, confirm and prompt are implemented...
There is just to little control for the developer....

To make the alert etc better I would like the following:
1. Being able to control the title (100%)
2. Being able to control the title bar bg color and border color.

Where #1 is for being able to give meaningful information in titlebar which actually has something to do with the message.
And where #2 is for being able to present the enduser with a message surounded with colors matching the colors in the current web-page.

I belive that the developer should be in control on how things are presented.

And saying that .... just use third parties alerts .... are not allways a good solution ... mostly because these third parties alerts often use quirky coding to make it work for the current browsers.... and one would never now if it would work in next generation of browsers.

Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.