?
Solved

bold. italic & underline text in alert box

Posted on 2004-10-02
7
Medium Priority
?
3,394 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 80 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
Suggested Courses

770 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