Solved

bold. italic & underline text in alert box

Posted on 2004-10-02
7
3,058 Views
Last Modified: 2012-06-27
i want the code to make bold, italic & underlined text in alert box. please send me the code in email.
0
Comment
Question by:anoriamalik
7 Comments
 
LVL 32

Accepted Solution

by:
ldbkutty earned 20 total points
ID: 12208900
It is not possible unless you write your own alert box. This might be of help:
http://www10.brinkster.com/a1ien51/Customize/
http://www10.brinkster.com/a1ien51/Customize/dragcustom.htm
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12209562
By the way, anoriamalik, please don't ask us to email the solution, this just defies the purpose of EE, which is to let future persons use these comments we make to answer their own questions.

Furthermore, how are we to find your email as it is not shown and is not in your profile?
0
 
LVL 12

Expert Comment

by:minichicken
ID: 12209641
Maybe use something like this

window.open ("alert.htm", "myalert", "width= 100, height= 100");
0
 
LVL 2

Expert Comment

by:vdhant
ID: 12210711
Here try this

<script language="JavaScript">
// Function to add the code for bold italic and underline, to the message
function AddMessageCode(code,promptText, InsertText) {

     if (code != "") {
        insertCode = prompt(promptText + "\n<" + code + ">xxx</" + code + ">", InsertText);
     if ((insertCode != null) && (insertCode != "")){
        document.story.body.value += "<" + code + ">" + insertCode + "</"+ code + "> ";
        } }            
     document.story.body.focus();
}
</script>

The above is the script and below is the triggger

<a href="JavaScript:AddMessageCode('strong','Enter text you want formatted in Bold', '')"><img src="bold.gif" border="0" alt="Bold"></a>
<a href="JavaScript:AddMessageCode('em','Enter text you want formatted in Italic', '')"><img src="italic.gif" border="0" alt="Italic"></a>
<a href="JavaScript:AddMessageCode('u','Enter text you want Underlined', '')"><img src="underline.gif" border="0" alt="Underline"></a>      

I think this is what you are after
ant      
0
 
LVL 2

Expert Comment

by:vdhant
ID: 12211643
How did you go anoriamalik
ant
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now