Insert HTML Into Your Browser Alert & Confirm Dialog | alert4html.js

alert4html.js is a JavaScript library that enables you to insert HTML directly into your browser alerts while simulating Chrome alerts as well.

alert4html.js is an alternative to the browser alert/confirmation dialog that allows you to create a rich text alert and confirm the dialog boxes on the page.

Must Read: Multi-Purpose Alert, Prompt, Confirm Dialog Alternative | jQuery.alert.js

How to make use of it:

1. Import the alert4html.js JavaScript library.

<script src="/src/script.min.js"></script>

2. Create a primary alert dialog.

new HTMLAlert('Alert!','<h1>A Basic Alert Dialog</h1>'

3. Create a customized affirm dialog with buttons and a callback function.

buttons = {
  "cheese": {
    type: "proceed",
    content: "Okay"
  },
  "idk": {
    type: "cancel",
    content: "Thanks"
  }
}
callback = function(content, type){
  console.log("You chose "+content);
  alert.destroy();
}
alert = new HTMLAlert('Confirm Dialog', "<h1>Are You Sure?</h1><b>Click The Okay Button To Delete This Entry</b>", buttons, callback);

See Demo And Download

browser-alert-confirm-dialog-alert4html-js

Official Website(ColonelParrot): Click Here

This superior jQuery/javascript plugin is developed by ColonelParrot. For extra Advanced Usage, please go to the official website.

Related Posts

Simple-and-Modern-Multi-Level-Sidebar-Menu-on-Bootstrap-4

[Offcanvas] Simple and Modern Multi-Level Sidebar Menu on Bootstrap 4

The multi-level sidebar menu is simple and fast on Bootstrap. So you must be aware of how to use Bootstrap itself. This plugin is fast, responsive, multi-level,…

bootstrap-5-dark-theme

Dark & Light Switch Mode Toggle for Bootstrap 5

Switching to dark mode is done by toggling HTML tags that include -dark or -light as a category. It is made by manipulating the DOM with JavaScript. The text color also changes depending…

vuejs-dialog-plugin

Vuejs Lightweight Prompt Based On Promise And Confirm Dialog

VUEJS DIALOG PLUGIN is a lightweight, promise-based, prompt, and dialog-based alert. Important updates The dialog will always be resolved by an object. (ie a callback to continue…

Lightweight-Flexbox-Carousel-Plugin

Simple and Lightweight Flexbox Carousel Plugin With JavaScript | flexCarousel.js

Flexbox Responsive Slider - flexCarousel.js plugin is a simple and lightweight plug-in from Flexbox carousel ES6 JavaScript. An unofficial fork by Slick Carousel. Flex Carousel is a…

bootstrap-5-multi-level-dropdown

Multi-Level Dropdown Works With Bootstrap 5

Bootstrap 5 Multi-Level Dropdown, using the official HTML without adding additional CSS styles and classes, it’s just like the original support. Not all of the things listed…

jquery-confirmation-dialog

JQuery UI Built Dynamic Modal That Uses Bootstrap | confirm.js

confirm.js is to use confirm modal created using JQuery and Bootstrap. Put events in each custom button in your web application. Easy to implement, saves time. Requirements…

Leave a Reply

Your email address will not be published. Required fields are marked *