Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (46 sloc) 1.2 KB
<!DOCTYPE html>
<html>
<head>
<title>Message - info</title>
<script type="text/javascript" src='../codebase/message.js'></script>
<link rel="stylesheet" type="text/css" href="../codebase/themes/message_default.css">
<style type="text/css">
.dhtmlx-error{
font-weight:bold;
color:white;
background-color:red;
}
body, html {
height:100%;
}
input{
width:300px;
display:block;
font-family:Tahoma;
font-size:12pt;
padding:5px 20px;
}
</style>
</head>
<body>
<input type='button' value='Show message' onclick='dhtmlx.message("You have pressed the button!")'>
<input type='button' value='Show message with custom style' onclick='dhtmlx.message({ type:"error", text:"You have pressed the <br> CRITICAL button!" })'>
<input type='button' value='Persistent message' onclick='dhtmlx.message({ expire:-1, text:"Click on me to close" })'>
<br>
<script type="text/javascript">
var num = 1;
function show_message(){
var n = Math.random()*20;
if (n<15) return;
var message = {
text:"Message #"+(num++),
type:(n>18?"error":"")
}
dhtmlx.message(message);
}
for (var i = 0; i < 10; i++)
show_message();
window.setInterval(show_message, 500);
</script>
</body>
</html>