Javascript just offers a simple alert box without any customisation. With the code below u can call a VBscript function from javascript witch makes it possible to create your own alert box with or without an icon.
Javascript function
NS4 = (document.layers);
IE4 = (document.all);
ver4 = (NS4 || IE4);function newAlert(title,mess,icon,mods) {
(IE4) ? makeMsgBox(title,mess,icon,0,0,mods) : alert(mess);
}
VBScript function
Function makeMsgBox(tit,mess,icons,buts,defs,mods)
butVal = buts + (icons*16) + (defs*256) + (mods*4096)
makeMsgBox = MsgBox(mess,butVal,tit)
End Function
Call the new alert box
newAlert(“title”,”msg”,0,0);
Popularity: 4% [?]
One Response
kevin
September 5th, 2007 at 9:48 am
1thx, i have been searching for this code for a long time !
you made my day
RSS feed for comments on this post · TrackBack URI
Leave a reply