Solved

bold. italic & underline text in alert box

Posted on 2004-10-02
7
3,224 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
This article discusses how to create an extensible mechanism for linked drop downs.
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…

726 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