anoriamalik
asked on
bold. italic & underline text in alert box
i want the code to make bold, italic & underlined text in alert box. please send me the code in email.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe use something like this
window.open ("alert.htm", "myalert", "width= 100, height= 100");
window.open ("alert.htm", "myalert", "width= 100, height= 100");
Here try this
<script language="JavaScript">
// Function to add the code for bold italic and underline, to the message
function AddMessageCode(code,prompt Text, 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:AddMessag eCode('str ong','Ente r text you want formatted in Bold', '')"><img src="bold.gif" border="0" alt="Bold"></a>
<a href="JavaScript:AddMessag eCode('em' ,'Enter text you want formatted in Italic', '')"><img src="italic.gif" border="0" alt="Italic"></a>
<a href="JavaScript:AddMessag eCode('u', 'Enter text you want Underlined', '')"><img src="underline.gif" border="0" alt="Underline"></a>
I think this is what you are after
ant
<script language="JavaScript">
// Function to add the code for bold italic and underline, to the message
function AddMessageCode(code,prompt
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:AddMessag
<a href="JavaScript:AddMessag
<a href="JavaScript:AddMessag
I think this is what you are after
ant
How did you go anoriamalik
ant
ant
Furthermore, how are we to find your email as it is not shown and is not in your profile?