Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bold Text

Status
Not open for further replies.

muru

MIS
May 21, 2003
5
US
Hi,
I am trying to bold part of a text in my confirmation screen to be bold. I surfed the web and i tried using it but it just would't work. I don't know what I am doing wrong. below is my code.

window.onbeforeunload = confirmExit;
function confirmExit()
{
if (needToConfirm)
var text = "This will end your current session.";
var textBold = text.bold();
return (textBold);
}

but all this does is return the string with a <b>....</b> in the confirmation screen. Instead I would like to be actually bold. What did I do wrong here?


thanks,
muru
 
you cannot change the text formatting in system dialogs such as alert(), confirm(), prompt() or the onbeforeunload dialog.


-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
i like your sleeves...they're real big
 
If you want to get creative, instead of using confirm you could create a window on the screen with your question and answer buttons. Use absolute positioning to place it on the page and change it's visibility when needed. Or use a layer and just bring it to the top.


Paranoid? ME?? WHO WANTS TO KNOW????
 
Thank you very much for the quick replies guys.


bye,
muru
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top