Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Can we change the title of alert box displayed through Javascript?

Reply
Thread Tools

Can we change the title of alert box displayed through Javascript?

 
 
geevaa
Guest
Posts: n/a
 
      04-24-2008
Hi All,

Using javascript i am displaying an alert...
Is there is a way to change the title of the alert box displayed
through Javascript

Here is my simple javascript code
<script type = "text/javascript">
alert('Hi All !!!')
</script>

When I run the above code I can see an alert box with the content "Hi
All" ...
But the title of the alert box displayed in firefox is "The page at
http://localhost says"...


Is there is a way to change this text to my own coustomized text..?

Is there is any thing a client side programmer had got to do with this
title text..?

Is there is a way to change the cursor pointer to cursor hand when the
user moves his pointer on the ok button on the alert box ..?

Thanks in advance..
 
Reply With Quote
 
 
 
 
Jeremy J Starcher
Guest
Posts: n/a
 
      04-24-2008
On Thu, 24 Apr 2008 07:26:30 -0700, geevaa wrote:

> Hi All,
>
> Using javascript i am displaying an alert...
> Is there is a way to change the title of the alert box displayed through
> Javascript
>
> Here is my simple javascript code
> <script type = "text/javascript">
> alert('Hi All !!!')
> </script>
>
> When I run the above code I can see an alert box with the content "Hi
> All" ...
> But the title of the alert box displayed in firefox is "The page at
> http://localhost says"...
>
>
> Is there is a way to change this text to my own coustomized text..?


No UA that I know of would allow that to be changed. It is an important
part of the JavaScript security model.

>
> Is there is any thing a client side programmer had got to do with this
> title text..?


Again no.

>
> Is there is a way to change the cursor pointer to cursor hand when the
> user moves his pointer on the ok button on the alert box ..?


The alert box is not a Javascript function, it is provided by the hosting
user agent. The hosting UA doesn't even have to display an 'OK' button
and may, in fact, provide others. (IIRC, Opera offers a 'Stop running
all javascript on this page' type option as well.)

>
> Thanks in advance..


 
Reply With Quote
 
 
 
 
geevaa
Guest
Posts: n/a
 
      04-25-2008
Thanks for Your help Jeremy J Starcher.

On Apr 24, 11:27 pm, Jeremy J Starcher <(E-Mail Removed)> wrote:
> On Thu, 24 Apr 2008 07:26:30 -0700, geevaa wrote:
> > Hi All,

>
> > Using javascript i am displaying an alert...
> > Is there is a way to change the title of the alert box displayed through
> > Javascript

>
> > Here is my simple javascript code
> > <script type = "text/javascript">
> > alert('Hi All !!!')
> > </script>

>
> > When I run the above code I can see an alert box with the content "Hi
> > All" ...
> > But the title of the alert box displayed in firefox is "The page at
> >http://localhostsays"...

>
> > Is there is a way to change this text to my own coustomized text..?

>
> No UA that I know of would allow that to be changed. It is an important
> part of the JavaScript security model.
>
>
>
> > Is there is any thing a client side programmer had got to do with this
> > title text..?

>
> Again no.
>
>
>
> > Is there is a way to change the cursor pointer to cursor hand when the
> > user moves his pointer on the ok button on the alert box ..?

>
> The alert box is not a Javascript function, it is provided by the hosting
> user agent. The hosting UA doesn't even have to display an 'OK' button
> and may, in fact, provide others. (IIRC, Opera offers a 'Stop running
> all javascript on this page' type option as well.)
>
>
>
> > Thanks in advance..


 
Reply With Quote
 
Captain Paralytic
Guest
Posts: n/a
 
      04-25-2008
On 24 Apr, 14:26, geevaa <(E-Mail Removed)> wrote:
> Hi All,
>
> Using javascript i am displaying an alert...
> Is there is a way to change the title of the alert box displayed
> through Javascript
>
> Here is my simple javascript code
> <script type = "text/javascript">
> alert('Hi All !!!')
> </script>
>
> When I run the above code I can see an alert box with the content "Hi
> All" ...
> But the title of the alert box displayed in firefox is "The page athttp://localhostsays"...
>
> Is there is a way to change this text to my own coustomized text..?
>
> Is there is any thing a client side programmer had got to do with this
> title text..?
>
> Is there is a way to change the cursor pointer to cursor hand when the
> user moves his pointer on the ok button on the alert box ..?
>
> Thanks in advance..


Use a popup DIV instead. You can make it say anything you like then.
e.g.
http://www.dynamicdrive.com/dynamicindex11/abox2.htm
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Japanese Text not displayed on Image Generated by Servlet on winXP, Linux but displayed on Win2000 boney Java 1 12-15-2006 02:24 PM
How 2 place page title into window title using sitemap in master page? bednar.tomas@gmail.com ASP .Net 0 11-30-2006 03:17 PM
Does anyone know the title of the first ever DVD title released? (UK/US) Mikey DVD Video 12 09-23-2006 07:14 PM
change the title bar of the JavaScript alert box Matt Javascript 3 10-25-2004 08:47 PM
Fastest way to get a the string between <title> </title> Andreas Klemt ASP .Net 1 08-10-2003 01:58 AM



Advertisments