PDA

View Full Version : Completely customizable alert Boxes!!


l3vi
02-14-2003, 04:47 AM
Okay, I thought up this script when I was working on a website that acted as a cell phone. I did take a little coding outta brothercakes frogger script. If you dont want me to have this up here, just let me know. But here it is:


function alert(msg)
{
alObj=document.createElement("div");
document.body.appendChild(alObj);

alData='<table cellpadding="0" cellspacing="0" border="0" style="width:25%;height:10%;position:absolute;left:355;top:180;z-index:1;"><tr><td align="center" valign="middle">'
alData+='<table cellpadding="0" cellspacing="12" border="0" style="-moz-box-sizing:border-box;font:15px comic sans ms,arial;color:#1d4fa8;font-weight:bold;background-color:#f4f887;border:1px solid #1d4fa8;width:250px;filter:progid:DXImageTransform.Microsoft.Shadow(color=#1d4fa8,direction=135,stre ngth=5);">'
alData+='<tr>';
alData+='<td align="center">'+msg+'</td>';
alData+='</tr>';
alData+='<tr>';
alData+='<td align="center"><input type="button" onClick="clal()" value="Ok" style="border:1px inset #1d4fa8;background:#f4f887;color:#1d4fa8;font-weight:bold;height:20;">';
alData+='</tr>';
alData+='</table>';
alData+='</td></tr></table>';

alObj.innerHTML = alData;

}

function clal()
{
document.body.removeChild(alObj);
alObj=null;
}


You can edit it however you want to.

To get it working, all you have to do is create a link or something like this:

<a href="javascript:alert('Hello! How are you?')">Greetings</a>

and the alert will come up as any other kind!

Skyzyx
02-18-2003, 09:04 AM
Is it cross-browser? Is it supported by the standards-compliant Netscape 6+, Mozilla, Phoenix, Chimera, Galeon, AOL 7 for Mac OS X, CompuServe 7, Opera 7, Konqueror, or Safari? Or is it only for Internet Explorer, MSN Explorer, or AOL for Windows?

l3vi
02-19-2003, 02:21 AM
Originally posted by Skyzyx
Is it cross-browser? Is it supported by the standards-compliant Netscape 6+, Mozilla, Phoenix, Chimera, Galeon, AOL 7 for Mac OS X, CompuServe 7, Opera 7, Konqueror, or Safari? Or is it only for Internet Explorer, MSN Explorer, or AOL for Windows?

Im not really sure. It might be. Sorry I cant tell ya:( Im pretty sure it is though.;)

Jamin
02-22-2003, 10:32 PM
:o I don't really know a whole lot about this stuff...but where exactly do i put the java link thingy at?

Skyzyx
02-23-2003, 07:36 AM
I'm sorry... sarcasm doesn't transmit well over the internet. I meant to say "This is NOT a crossbrowser script, so don't use it unless you are designing webpages that will only be viewed by people with Internet Explorer, because it won't work with any other browser."

kwhubby
02-24-2003, 02:54 AM
Is it cross-browser? Is it supported by the standards-compliant Netscape 6+, Mozilla, Phoenix, Chimera, Galeon, AOL 7 for Mac OS X, CompuServe 7, Opera 7, Konqueror, or Safari? Or is it only for Internet Explorer, MSN Explorer, or AOL for Windows?

1. Chimera, Galeon, Safari, standards??????? never even heard of those!!! probobly only like .1% of people use any of them

ps. aol 8 for windows uses mozilla

Skyzyx
02-24-2003, 03:28 PM
Actually, I've done some testing with AOL 8, and read the information straight from AOL. AOL 8 for Windows still uses the IE engine. They were planning the changeover for AOL 8, but it has been pushed back to AOL 9.

You've never heard of standards?! www.w3.org is the group that decides the standards. Most of those other browsers I pointed out are based on the Gecko engine... same as Netscape 6 and 7. They make up far more of a market share than 0.1%. Don't believe too much of the propaganda that Microsoft feeds you...

I used to use Internet Explorer exclusively too... until the day I discovered Mozilla. I installed it, set it to load on startup, made it my default browser, and haven't ever looked back... perhaps you should give it a try before you flame it... www.mozilla.org .

kwhubby
02-24-2003, 08:51 PM
i do, and I like some of the added features and such, yet i am used to ie, and like its less strict parsing, and i am used to its support of stuff like document.all, and other ie only stuff. And whenever I make something even if I don't use document.all Its always first compatible with ie, and then as an after thought I work to maby get it mozilla compatible.

as of standards, I never mentioned gecko, I just said I never heard of Chimera, Galeon, and Safari (i did just hear of safari though)
ive heard of gecko!

edit: aol 8 is ie LOL!!!!! god, even the personel of aol say its mozilla.
( i don't use aol, i just had acess to "im" with some aol help guy)

zoobie
02-28-2003, 08:21 PM
Originally posted by Skyzyx
Is it cross-browser? Is it supported by the standards-compliant Netscape 6+, Mozilla, Phoenix, Chimera, Galeon, AOL 7 for Mac OS X, CompuServe 7, Opera 7, Konqueror, or Safari? Or is it only for Internet Explorer, MSN Explorer, or AOL for Windows?

...and what about the new Zoobie browser? :D

PS - My g/f would beat you up and sit on you 'till you cried for having that sig.

Skyzyx
03-01-2003, 04:53 PM
You need to read the old Calvin and Hobbes comic strips. They're my heroes!