CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Thread: Alertbox ?

  1. #1
    Join Date
    Oct 2002
    Posts
    21

    Alertbox ?

    Hello!

    Having trouble making an popup alertbox/popup window. I need

    a text in the title list.
    the yellow "alert "!"
    text in 3 rows
    an ok button

    Thats, all, seems easy, but it is'nt. ;-(

    Happy for any help

    Klas

  2. #2
    Join Date
    Jul 2002
    Location
    Don't Know, Don't Care
    Posts
    346
    Code:
    <script language="javascript">
    alert("Help\nMe\nPlease!");
    </script>
    hows that? not sure what you mean by the title though...

    C G C F A D--Feel the Noise

    "When your life goes nowhere and leads back to me, doesn't that tell you something?"
    ~Gray Area Fury

  3. #3
    Join Date
    Oct 2002
    Posts
    21
    Hi!

    Thanks for the help.

    With title, I meant like in this window, it says "CodeGuruForums"

    Is it possible to have the window on onclick(when pressing on a link) instead please?

  4. #4
    Join Date
    Oct 2002
    Posts
    21
    Even better would be if anybody could add a title(at top of window) to this alertbox, please?

    <a href="#" onclick="alert('one,\ntwo\three.');">Hit me!</a>

    Huge thanks in advance.

  5. #5
    Join Date
    Jul 2002
    Location
    Don't Know, Don't Care
    Posts
    346
    Code:
    <!--note: link could be anything, i use the # sign so it doesn't go anywhere-->
    <a href="#" onclick="javascript:document.title='Oh No!';alert('Help\nMe\nPlease!');">Alert</a>
    anything else?

    by the way, what were you doing earlier that was giving you trouble?

    C G C F A D--Feel the Noise

    "When your life goes nowhere and leads back to me, doesn't that tell you something?"
    ~Gray Area Fury

  6. #6
    Join Date
    Jul 2002
    Location
    Don't Know, Don't Care
    Posts
    346
    >>Even better would be if anybody could add a title(at top of window) to this alertbox, please

    sorry, not possible.

    Some older netscape scripting browsers show the document title on the alert box, in which case changing the document title would do it, but not many people use those browsers anymore. You're on your own for that one...I had a thread on here a while back that had to do with modeless dialog boxes, search for that, that may be what you're looking for, but it's very advanced...i don't think you'd be able to handle it since you couldn't do an alert box (no offense)

    C G C F A D--Feel the Noise

    "When your life goes nowhere and leads back to me, doesn't that tell you something?"
    ~Gray Area Fury

  7. #7
    Join Date
    Oct 2002
    Posts
    21
    Me again...

    Thanks for the help, but I was thinking about the title of the alert box, not the big window. (I did explain bad, I know...)

    Well, I guess my trouble is that i from the beginning didn't know there is a difference between a popup window and an alertbox.

    Klas

  8. #8
    Join Date
    Jul 2002
    Location
    Don't Know, Don't Care
    Posts
    346
    look up at my previous reply

    C G C F A D--Feel the Noise

    "When your life goes nowhere and leads back to me, doesn't that tell you something?"
    ~Gray Area Fury

  9. #9
    Join Date
    Oct 2002
    Posts
    21
    I see, well, thanks for the help anyway.

  10. #10
    Join Date
    Jan 2002
    Location
    Helsinki, Finland
    Posts
    99
    You can find additional information about creating custom dialogs at : http://www24.brinkster.com/zvona/zProcessing.html

    Example above is used for displaying a custom dialog (with custom titlebar) when document is loading.
    Zvona - First aid for client-side web design

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured