Reputation: 6111
I want to change layout of google chrome alert box
, My basic need to alert value like "Item added sucessfully" but in google chrome alert box it is good to see can it is posible google chrome alert box
show like a model window in the center of screen with some effective design?
Upvotes: 4
Views: 6149
Reputation: 313
I know the answer is two years old, but I just wanted to point out that there is a good reason why you can not style some elements including the alert. It's security issue. If the alert could be customized, then the user may be tricked into doing something that he is not expecting.
Personally I use Swal, it's great jQuery plugin and can be easily customized to any web design.
http://t4t5.github.io/sweetalert/
Upvotes: 0
Reputation: 645
Changing built-in alert dialog box for chrome/IE/FF is not possible. Workaround is to use jQuery alert dialog. Same question has already been asked here and answered. you can also see an example in jsFiddle
$("<div>Test message</div>").dialog();
Upvotes: 2
Reputation: 4899
Frankly it isnot possible to change the default alert box. It is set by the browser devlopers and cannot be changed on the client side. Rather try popupwindows using jquery
or a custom div popup or use some jquery code after searching which ever suits you the best :)
Upvotes: 0
Reputation: 7475
you can use alert("Item added sucessfully"); i suggest you to work with fancybox http://fancybox.net/ i don't think alert can be designed. sometimes alert can be annoying and can be disabled by the browser if popping more than once, i suggest to use something else like facnybox
Upvotes: 0