Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<style type="text/css">
/*<![CDATA[*/
#pop {
position:absolute;visibility:hidden;left:100px;top:100px;height:100px;width:200px;background-Color:red;
}
/*]]>*/
</style><script type="text/javascript">
/*<![CDATA[*/
function Print(){
var obj=document.getElementById('pop');
if (obj.style.visibility!='visible'){
obj.style.visibility='visible';
// call the print function here
setTimeout(function(){ obj.style.visibility='hidden'; },20000);
}
}
/*]]>*/
</script></head>
<body>
<input type="button" name="" value="Print" onmouseup="Print();" />
<div id="pop" ></div>
</body>
</html>