Change title bar text and make new line-alert function

Is there a way to change the text in the title bar of an alert box.

Also is there a way to make the text go to a new line instead of forcing it by using spaces.

Here is the alert function as I am using it to bring up the alert dialog box along with the spaces I am using to force a new line.

<a href="" onmouseover="alert ('Netscape  -- Hold Shift Key & Click on Reload                                             Internet Explorer -- Hold Control Key & Click on Refresh');return true;"><img border="0" src="ANsound.gif" width="100" height="30" alt="Swing Dance Music">
</a>

This is being used with the "sound" animation image at the top of http://www.dancedk.com
LVL 2
READERAsked:
Who is Participating?
 
lambdaCommented:
U can use '\n' for new line, '\t' for tab etc.
alert ('Netscape  -- Hold Shift Key & Click on Reload\n Internet Explorer -- Hold Control Key & Click on Refresh');
0
 
READERAuthor Commented:
lambda

Thanks for solution to create new lines.

Is there a way that I can change the text that shows up in the blue bar at the top of the alert box?

0
 
lambdaCommented:
I don't think so, but I am not sure. Better wait for some other expert to come up...
Sorry!

£.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
CJ_SCommented:
No, this isn't possible.

Give Lambda the points....

another thing. All the \x things from C++ an stuff work in javascript  except not the \a which makes a BEEEEEEP.....=)
0
 
SubhumanCommented:
*agrees* you cannot change Title text.
0
 
bark10Commented:
You cannot change the title in a Javascript alert box BUT, you can imbed Visual Basic in your scripts and use the MsgBox function.  This function does allow title change and gives much more freedom with buttons.

The best explaination I have seen of this is http://www.webreference.com/dhtml/column22/js-vbNewvb.html

The \x characters still work with this.
0
 
CJ_SCommented:
A messagebox is something else as an alert box. A messageBox can contain any button you want, predefined though...

0
 
bark10Commented:
Thanks CJ_S, I know this ...

....but as I said, it gives you much more freedom than an alert box and you can have the same ALERT icon in the msgbox.  This can probably be incorporated to fit READERS needs.
0
 
kollegovCommented:
Don't think VB dialog is a good solution..
I'd suggest to pop up html window

w=window.open('alert.html','_blank','width=300,height=200');

And write HTML in alert.html file
At least <TITLE> will be in your hands
now :-)
And no problems with formatting :)


0
 
packratt_jkCommented:
agree with kollegov
0
 
READERAuthor Commented:
Thanks to all for some great suggestions.

I am giving the points to lambda because he was first with the answer to the original question which related
specifically to using the "alert" function.

I have lots of homework to do in checking out all the other suggestions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.