Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts

    Variation on confirm?

    Hi,

    This is really several questions:

    In a nutshell, I would like to make a confirm with the following format:

    <title bar shows the string *** WARNING *** as opposed to Microsoft Internet Explorer (or whatever) >

    <message to be displayed is (note - 2 lines with a break in between):
    You are about to blow up the world.

    Are you really sure you want to do this?

    >

    <buttons YES NO instead of OK CANCEL>

    So:

    1) How do you change the title?
    2) How do you display messages on multiple lines?
    3) How do you change ok/cancel to yes/no?

    I know how to do this by writing an HTML pop-up window and then manually writing code to trap the return values, but that seems like overkill when javascript has neatly provided the confirm dialogue box anyway!

    Thanks,
    Mike.
    Die Welt ist ein Irrenhaus und hier ist die Zentrale!

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,731
    Thanks
    202
    Thanked 2,508 Times in 2,486 Posts
    1) How do you change the title?
    Make the title "***warning*** &nbsp &nbsp "
    with lots of spaces to push the Microsoft legend out of sight to the right.

    2) How do you display messages on multiple lines?
    I don't think that is possible (in the title bar).

    3) How do you change ok/cancel to yes/no?
    That is definitely not possible except by making a custom pop-up.
    Last edited by Philip M; 10-21-2005 at 02:48 PM.

  • #3
    Regular Coder
    Join Date
    Sep 2005
    Posts
    535
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you are going to make your own pop-up, then you can add multi-lines on text...
    * Create a textarea to display your message and then use '\n' along with JS to fill in the text
    or
    * Create a <p> and add <br> to make a new line...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •