Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Text BOLD in Alert or Confirm box?

How to get BOLD Text and change color of text in Alert or Confirm box?

var conFrm =  confirm("Following List(s) already Sent...!\n<strong>List Name:  </strong>"+ss.replace(",","\n<b>Name: </b>")+"\n Do you want to send again...!"); 
like image 475
Warrior Avatar asked Apr 11 '11 11:04

Warrior


People also ask

How do you make text show as bold?

Type the keyboard shortcut: CTRL+B.

What is the bold command?

Bold text: Ctrl + B — "B" is for "bold." This shortcut works for new text you type after using it, or you can highlight existing text and then bold it via the shortcut.

How do I make text bold in JQuery?

addClass("boldText");


2 Answers

You can't do it. But you can use custom Alert and Confirm boxes.

You can read about some User Interface libraries here:

http://speckyboy.com/2010/05/17/15-javascript-web-ui-libraries-frameworks-and-libraries/

Most common libraries are:

  • http://jqueryui.com/
  • http://mootools.net/
  • http://www.prototype-ui.com/
  • http://script.aculo.us/
  • http://developer.yahoo.com/yui/
like image 158
fl00r Avatar answered Sep 28 '22 05:09

fl00r


The alert() dialog is not rendered in HTML, and thus the HTML you have embedded is meaningless.

You'd need to use a custom modal to achieve that.

like image 36
alex Avatar answered Sep 28 '22 05:09

alex