JavaScript - change alertbox title name - Asked By sailaja ravula on 29-Jun-12 05:54 AM

I want to change the title of the alert Message box in Javascript. By default it shows only "Microsoft Internet Explorer ". I want my own title message. 

kindly suggest me the answer. 
Sathish S replied to sailaja ravula on 29-Jun-12 06:04 AM
Not possible when you are using Javascript alerts.

You may use VBScript or Jquery 
Chintan Vaghela replied to sailaja ravula on 29-Jun-12 06:05 AM

Hi Frndz,


Functionality:  Change Title in Javascript Alert Meeage



You can not  change Title for Alert message in javascript


Its a  security  features.




Hope this helpful!





Jitendra Faye replied to sailaja ravula on 29-Jun-12 06:25 AM
you can not change title of alert box, for this you can use jquery popup control.
like this this-

If you want to show modal popup then use jquery popup.

after adding jqueryui plugin you can use it.

like this-


function funShow() {

$('#dialog).dialog({ resizable: false, height: 140, modal: true });


<div id="dialog" title="Basic dialog">hi

<asp:Button runat="server" Text="Button" onClientClick="return funShow()" />



Vikram Singh Saini replied to sailaja ravula on 29-Jun-12 06:42 AM
You can use third party Telerik's control RadAlert for same.

Check link:
Lalit M replied to sailaja ravula on 29-Jun-12 07:05 AM
you can't change the title name of alert box its a security/anti-phishing feature.

you can created a custom Alert box by overloading the alert( ) method.

check here for help
dipa ahuja replied to sailaja ravula on 29-Jun-12 08:53 AM

Using JavaScript simple alert box :

Page.RegisterClientScriptBlock("""<script>alert('Book Added');</script>");

Response.Write("<script>alert('Book Added')</script>");

Or you can display your own window by

using the modalpopupExtender:

CSS Effect


<style type="text/css">
















ModapPopUp Code


<cc1:ModalPopupExtender TargetControlID="Button2" BackgroundCssClass="modalBackground"

CancelControlID="btnMsg" PopupControlID="Panel1" PopupDragHandleControlID="btnMsg"

ID="ModalPopupExtender2" runat="server">


<asp:Panel ID="Panel1" runat="server" CssClass="ModalWindow">

<%--Button popup--%>


<table runat="server">


  <td bgcolor="#cccccc" style="border: 1px; border-color: Black;" height="20px" align="left"


  <div style="border-bottom-width: 1px; border: 1px solid">





  <td align="center" bgcolor="#99ccff">

  <br />

  The Record has been deleted!




<asp:Button ID="btnMsg" runat="server" Text="OK" /><br />



<asp:Button ID="Button2" runat="server" Text="OK" /><br />

avula replied to dipa ahuja on 03-Jul-12 01:31 AM
You can't change Title of the Alert box using javascript..

use fallowing plug-in..
you can customize as much as you speak.
its very required any application that entire look and feel of alerts,confirms boxes should be same