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

Discussion in 'Javascript' started by geevaa, Apr 24, 2008.

  1. geevaa

    geevaa Guest

    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..
    geevaa, Apr 24, 2008
    #1
    1. Advertising

  2. Re: Can we change the title of alert box displayed throughJavascript?

    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..
    Jeremy J Starcher, Apr 24, 2008
    #2
    1. Advertising

  3. geevaa

    geevaa Guest

    Re: Can we change the title of alert box displayed throughJavascript?

    Thanks for Your help Jeremy J Starcher.

    On Apr 24, 11:27 pm, Jeremy J Starcher <> 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..
    geevaa, Apr 25, 2008
    #3
  4. Re: Can we change the title of alert box displayed throughJavascript?

    On 24 Apr, 14:26, 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 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
    Captain Paralytic, Apr 25, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    1
    Views:
    445
    Steve C. Orr, MCSD
    Aug 10, 2003
  2. Replies:
    0
    Views:
    512
  3. boney
    Replies:
    1
    Views:
    561
  4. Replies:
    1
    Views:
    530
    David
    Apr 24, 2007
  5. Matt
    Replies:
    3
    Views:
    1,864
    kaeli
    Oct 25, 2004
Loading...

Share This Page