2

Possible Duplicate:
Change the native confirm/alert

I would like to know if you can change the style of an alert box (i.e color, font). Can someone give me an example?

Community
  • 1
  • 1

5 Answers5

2

You cannot change this. You can create your own, using absolutely-positioned HTML elements. These are called Modal Dialogs or Modal Windows.

Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176
1

No, you can't.

Instead, you can create a fake dialog in Javascript, like jQuery UI Dialog.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
1

No, I'm afraid that is not possible.

With JavaScript, you are limited to only 3 popup boxes: alert, prompt and confirm.

Sameera Thilakasiri
  • 9,452
  • 10
  • 51
  • 86
0

Have you tried jQuery's UI? They have a dialog box you can customize.

http://jqueryui.com/demos/dialog/

http://jqueryui.com/themeroller/

LordZardeck
  • 7,953
  • 19
  • 62
  • 119
0

Here's an example of the jQuery UI dialog, which may be what you're looking after:

http://jsfiddle.net/2f3LG/

As mentioned before, different "themes" (css styles) are available to choose or customize yourself here: http://jqueryui.com/themeroller/

Vigrond
  • 8,148
  • 4
  • 28
  • 46