Maulik patel
Maulik patel

Reputation: 1601

confirmbox() with different appearance

I need a confirm box with different a appearance?

the default look for confirm() is this.. I don't want this confirmbox design.

enter image description here

confirm("Get a message?");

Upvotes: 3

Views: 165

Answers (4)

epascarello
epascarello

Reputation: 207511

You can not change the appearance of a confirm so you are stuck the look that the browser gives you. You can create your own confirm type of control yourself with HTML/JavaScript/CSS, but the issue is it will not pause execution and wait for a user's response. So coding confirms for form submissions gets a little tricky.

Upvotes: 0

willDaBeast
willDaBeast

Reputation: 120

The appearance of the 'confirm' and 'alert' methods in JS are governed solely by the browser and cannot be changed in code.

I suggest using jQuery and a suitable plug-in like this one: http://abeautifulsite.net/blog/2008/12/jquery-alert-dialogs/. You'll be able to change the appearance and it'll be the same over all browsers.

Upvotes: 1

bezmax
bezmax

Reputation: 26132

That dialog can not be styled. Your only option is to use custom javascript widget library.

To find a complete library of various widgets you can google for "javascript widgets" or simply use jQuery UI library (specifically jQuery UI dialog widget).

Upvotes: 1

Daniel A. White
Daniel A. White

Reputation: 190943

You can use a jQuery UI dialog or any other dialog plugins.

Upvotes: 1

Related Questions