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
  • 110,221
  • 32
  • 151
  • 174
1

No, you can't.

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

SLaks
  • 837,282
  • 173
  • 1,862
  • 1,933
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,255
  • 9
  • 53
  • 84
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,588
  • 19
  • 58
  • 116
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,018
  • 4
  • 26
  • 44