0

I am having trouble googling this, because I am not sure what it is called:-)

When you create an alert box and it pops up you get the message that needs to be displayed.

Just above that it gives the URL of the domain you are currently on.

Can I change that to say a name rather than a domain?

If so, what is that line called and how do I overwrite this?? Cheers

jwknz
  • 6,598
  • 16
  • 72
  • 115
  • 1
    There is [this question](http://stackoverflow.com/questions/1905289/how-to-edit-a-javascript-alert-box-title), everyone says it is impossible. – Leonid Sep 16 '11 at 04:11

3 Answers3

2

You cannot change this as its part of the browser. For example chrome shows this:

enter image description here

If you need custom alert boxes, take a look into something like jQuery ui Dialog

wesbos
  • 25,839
  • 30
  • 106
  • 143
1

The "top line" that you refer to is called the "title bar".

And no, you can't change it: this is a browser security feature (and different browsers display different titles).

There are, however, ways to implement your own modal dialogs from JavaScript using HTML & CSS, the jQuery UI dialog being just one of many ways to do so with minimal effort.

nnnnnn
  • 147,572
  • 30
  • 200
  • 241
0

No, this cannot be done using an alert, but you could create a popup and change the title.

fanfavorite
  • 5,128
  • 1
  • 31
  • 58