web analytics


We are making an alert using simple Javascript . The following code will add an alert by using an HTML button and the onClick event.

An alert dialog box is mostly used to give a warning message to the users. Like if one input field requires to enter some text but user does not enter that field then as a part of validation you can se alert box to give warning message as follows:


Just use javascript and css into the zip folder and copy the below HTML into your code

<div id=”shadowing_boxmessage”></div>
<div id=”box_message_wrapper”>
<span id=”boxtitle_messagebox”></span>
<div id=”showHtml”>
<p id=”messageContentBox”> </p>
<div style=”clear:both”></div>
<div id=”msgbuttons” style=”float:right; margin-right: 10px;”></div>



Tested in:


Bivash Kanti Pal

Hi guys, This is the place where developers are sharing there thoughts....

One thought on “JS-AlertBox

  • September 30, 2013 at 6:52 am

    Thanks Bivash, it’s really great.


Leave a Reply

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

Result of *Captcha loading...

Do NOT follow this link or you will be banned from the site!