popup.tt
<style type="text/css">
html {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
position: absolute;
top: 0;
left: 0;
}
#confirm {
background: #000000;
height: 100%;
width: 100%;
display: none;
position: absolute;
left: 0;
top: 0;
-moz-opacity: 0.5;
filter: alpha(Opacity=50);
}
#confirm div {
background: #7799aa;
text-align: center;
border: 2px ridge #000000;
color: #000000;
padding: 2em;
width: 14em;
height: 7em;
margin-left: -7em;
margin-top: -3.5em;
position: absolute;
top: 50%;
left: 50%;
}
#confirm input {
width: 5em;
}
</style>
<script type="text/javascript">
function _confirm(i) {
var c = document.getElementById('confirm')
c.style.display = i ? 'none' : 'block';
if(i < 0) {
c.style.display = 'block';
}
else {
c.style.display = 'none';
if(i > 0) {
window.location =
"http://www.google.com/search?q=site%3Aflodhest.net";
}
}
}
</script>
<h2>DHTML confirm()</h2>
<input type="button" value="click me" onclick="_confirm(-1)">
<div id="confirm">
<div>
Do you want to visit google.com?
<br>
<br>
<input type="button" value="ok" onclick="_confirm(1)"> ::
<input type="button" value="cancel" onclick="_confirm(0)">
</div>
</div>