This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes  How to display Alert Messages in Bold Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark " How to display Alert Messages in Bold" Watch " How to display Alert Messages in Bold" New topic
Author

How to display Alert Messages in Bold

Ameya Thakur
Ranch Hand

Joined: Feb 04, 2004
Posts: 43
Hello Everyone,

I want the alert message which i give using javascript to be bold

I tried with using alert("<b>Hello</b>");

which is not working so is ther any ways in which we could make "Hello" bold

Thanks a lot in advance
-Ameya
Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
You can't utilize HTML formatting when displaying alert boxes. At most, I think you can only utilize simple escape sequences to alter the manner in which the text string is rendered within the alert box.
If you really need to customize your alert messages then you can go for some DHTML effects which simulate the behaviour of a modal window. You can find a nice implementation here
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display Alert Messages in Bold
 
Similar Threads
JTextComponent: Making certain text within the component as Bold
text formatting in JavaMail!!!!!!!!!!! URGENT!!!!!!!!!
dropdown problem
How to handle nested html tags in XSL?
how to extract tag from java by expression.