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
Solved

Change title bar text and make new line-alert function

Posted on 2000-04-23
11
311 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:READER
  • 2
  • 2
  • 2
  • +4
11 Comments
 
LVL 1

Accepted Solution

by:
lambda earned 50 total points
ID: 2742799
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
 
LVL 2

Author Comment

by:READER
ID: 2742895
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
 
LVL 1

Expert Comment

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

£.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 22

Expert Comment

by:CJ_S
ID: 2743025
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
 
LVL 1

Expert Comment

by:Subhuman
ID: 2743219
*agrees* you cannot change Title text.
0
 
LVL 3

Expert Comment

by:bark10
ID: 2743543
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
 
LVL 22

Expert Comment

by:CJ_S
ID: 2743585
A messagebox is something else as an alert box. A messageBox can contain any button you want, predefined though...

0
 
LVL 3

Expert Comment

by:bark10
ID: 2743605
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
 
LVL 10

Expert Comment

by:kollegov
ID: 2743854
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
 
LVL 3

Expert Comment

by:packratt_jk
ID: 2744609
agree with kollegov
0
 
LVL 2

Author Comment

by:READER
ID: 2745200
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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 …
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

765 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