Click here to Skip to main content
14,297,742 members
Rate this:
Please Sign up or sign in to vote.
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
Rate this:
Please Sign up or sign in to vote.

Solution 1

ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "thisScipt", "alert('Success');", true);
   
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
Rate this:
Please Sign up or sign in to vote.

Solution 2

1st Type-
<script type="text/javascript">
var y=window.prompt("please enter your name")
window.alert(y)
</script>



2nd Type-

<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>
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100