Create Consistent Browser Alert Dialogues for Your Website

Written by Kevin Liew on 06 Aug 2015
43,100 Views • Javascript

As a frontend developer, one of the goals throughout the development is to ensure the design looks consistent and identical in all platforms. Well, that's a life-long battle against different browsers' standards, and one of the uncontrollable element is browser alert dialogues.

If you don't know what am I talking about, take a look at this image, and spot the different.

There are totally different, the dimension is different, the default text is different, the button arrangement is different, color is different, the transition of displaying it or hiding it is different, the close button is inconsistent.

If you really want to take control of browser's alert dialogues, you can make use of Javascript solution. Here we have basicModal - an easy-to-use dialog system for modern web-apps. It doesn't come just the standard dialogue to display information, it also has prompt and login dialogues.

You can chain the modal, display dialogue in sequence. It also comes with a handful of useful functions so you have full control to react to user's response.

It's no longer bind to the browser, and you can style it accordingly to your website branding.


Join the discussion

Comments will be moderated and rel="nofollow" will be added to all links. You can wrap your coding with [code][/code] to make use of built-in syntax highlighter.