Click to See Complete Forum and Search --> : Alert - can part of message stand out?
moreta
08-06-2003, 10:21 AM
This is my alert box: alert ("You have exceeded available space.\n"+line[0]+
line[1]+line[2]+val.substr(start + breakat))
val.substr() is the part that actually exceeds the limitation. I'd like to display it in bold... or italic, red, or anything to make it stand out. I'm out of ideas. Can anyone help me with this?
Thank you,
moreta
You can't format the text in alert boxes...
moreta
08-06-2003, 10:38 AM
I appreciate the quick response Pyro, but that wasn't the answer I wanted. :rolleyes:
Could I add a line/score to visually separate the text that fits in the limits from the text that doesn't?
Any ideas on other ways to achieve the distinction? My paradigm needs refreshing.... I'm so stuck!
Thank you,
moreta
Well, I see you already know about the \n for a newline, so that is how you add line breaks to an alert. As far as a "line/score" I assume you mean a visual line that will separate the contents. If so, you could use multiple instances of the dash ( - ) or the underscore ( _ ) to separate it. Take a look at this:
<script type="text/javascript">
alert ("This is a test\n_________________\nAs is this.")
</script>
moreta
08-06-2003, 11:24 AM
I was expecting something complex. ______KISS :p
Thanks for bringing me back to earth!
moreta
lol... You're welcome... :)