How can i change the title of javascript alert popup ?
This question is related to
javascript
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.
It's not possible, sorry. If really needed, you could use a jQuery plugin to have a custom alert.
Simple: you can't.
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/
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().
Source: Stackoverflow.com