Click here to Skip to main content
15,902,636 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear sir,

How to alert message formatting in java script?

Any alternate way to solve this problem
can u tell me how?


by mohan.
Posted

JavaScript
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "thisScipt", "alert('Success');", true);
 
Share this answer
 
Comments
Mohankumar.Engain 9-Jan-12 3:20am    
hi anushripatil.
I know, and how to Format the text inside the alert box,
for example font size 16px and color=green like that i want inside alert("");
is it possible?
by mohan
anushripatil 9-Jan-12 3:26am    
directly in alert you cannot do, but there is a workaround, see the links
http://slayeroffice.com/code/custom_alert/
http://jqueryui.com/demos/dialog/
http://www.progtalk.com/viewarticle.aspx?articleid=73
Mohankumar.Engain 9-Jan-12 3:36am    
Hi anushripatil.

thanks again....
keep-in-touch
by
from mohan
1st Type-
XML
<script type="text/javascript">
var y=window.prompt("please enter your name")
window.alert(y)
</script>



2nd Type-

XML
<script type="text/javascript">
var x=window.confirm("Are you sure you are ok?")
if (x)
window.alert("Good!")
else
window.alert("Too bad")
</script>
 
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