Click here to Skip to main content
15,868,419 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I am using Vs2010 and C# Asp.Net. I am using Java Script Alert Message Box i need to put Title of the Alert Box how to i do it any one give me the solution.

Thanks Advance!....
Posted

No by default it can't be done due to security stuff. But you can use custom ones instead.

Please follow the link :

http://stackoverflow.com/questions/1905289/how-to-edit-a-javascript-alert-box-title[^]
 
Share this answer
 
Comments
Member 11889799 7-Oct-15 6:28am    
Thanks Smrutiranjan For your response.
It is not possible to modify the js alert() box title, but you can use other plugins to do that like

Bootbox.js[^]

Code:
JavaScript
bootbox.dialog({
  message: "I am a custom dialog",
  title: "Custom title",
  buttons: {
    main: {
      label: "Close",
      className: "btn-default",
      callback: function() {
        Example.show("Primary button");
      }
    }
  }
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900