User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20070515 Firefox/22.214.171.124 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20070515 Firefox/188.8.131.52 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
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.