Click to See Complete Forum and Search --> : Alertbox ?


Klas
November 6th, 2002, 09:05 PM
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

Waldo2k2
November 6th, 2002, 09:39 PM
<script language="javascript">
alert("Help\nMe\nPlease!");
</script>

hows that? not sure what you mean by the title though...

Klas
November 6th, 2002, 09:55 PM
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?

Klas
November 7th, 2002, 07:07 AM
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.

Waldo2k2
November 7th, 2002, 07:11 AM
<!--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?

Waldo2k2
November 7th, 2002, 07:20 AM
>>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)

Klas
November 7th, 2002, 07:21 AM
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

Waldo2k2
November 7th, 2002, 07:23 AM
look up at my previous reply

Klas
November 7th, 2002, 07:28 AM
I see, well, thanks for the help anyway. :)

Zvona
November 7th, 2002, 03:10 PM
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.