How can i change the title of javascript alert popup ?
6 Answers
You can't, this is determined by the browser, for the user's safety and security. For example you can't make it say "Virus detected" with a message of "Would you like to quarantine it now?"...at least not as an alert()
.
There are plenty of JavaScript Modal Dialogs out there though, that are far more customizable than alert()
.

- 1,497
- 2
- 22
- 36

- 623,446
- 136
- 1,297
- 1,155
As others have said, you can't do that either using alert()
or confirm()
.
You can, however, create an external HTML document containing your error message and an OK
button, set its <title>
element to whatever you want, then display it in a modal dialog box using showModalDialog().

- 258,201
- 41
- 486
- 479
You can't. The alert is a simple popup where you only can affect the content text.
If you want to change anything else, you have to use a different way of creating a popup.

- 687,336
- 108
- 737
- 1,005
you cant do this. Use a custom popup. Something like with the help of jQuery UI or jQuery BOXY.
for jQuery UI http://jqueryui.com/demos/dialog/
for jQuery BOXY http://onehackoranother.com/projects/jquery/boxy/

- 29,685
- 30
- 94
- 128
It's not possible, sorry. If really needed, you could use a jQuery plugin to have a custom alert.

- 11,285
- 11
- 53
- 59