Question

When you use javascript's alert() function within a PHP script or HTML page to notify the user of something, you usually get a dialogue that says:

The page at 123.456.78.9 says:
blah blah blah

Is there any way I could eliminate the IP part and simply display my desired message?

Was it helpful?

Solution

The javascript alerts by default gets the current domain name.

You can go for alternating solution of using some custom popups.

There is one jquery plugin Impromptu, in which you can show customized popups. It also has other features.

The basic example of showing it :

$.prompt('Hello World');

It displays popup with message 'Hello World'

for more details, refer to this link

OTHER TIPS

That is the default title style for Javascript Alert box and you cannot change that

If you want to work with changing the title of alertboxes , you could make use of JQuery Alert Dialog.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top