rendered paste body<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<title>A checklist, the cool way!</title>
<style type="text/css">
/*<![CDATA[*/
div input
{
padding: 0px;
margin: 0px;
text-align: center;
border: 1px solid blue;
color: blue;
background: white;
}
div
{
line-height: 20px;
padding: 0px;
margin: 0px;
border: 1px solid black;
width: 200px;
text-align: center;
overflow: hidden;
}
/*]]>*/
</style>
<script type="text/javascript">
//<![CDATA[
var dblClick = false;
var count = 0;
function changeTitle(e)
{
dblClick = true;
var obj = document.getElementById('note');
e = (!e) ? window.event : e;
var obj = (e.target) ? e.target : e.srcElement;
var input = document.createElement('input');
input.type = "text";
input.value = obj.innerHTML;
input.onkeyup = (input.onblur = setTitle);
obj.innerHTML = '';
obj.appendChild(input);
input.focus();
input.select();
}
function setTitle(e)
{
e = (!e) ? window.event : e;
var obj = (e.target) ? e.target : e.srcElement;
if(e.keyCode == 13 || e.type == 'blur')
{
obj.parentNode.innerHTML = obj.value;
dblClick = false;
count = 0;
}
}
function showNote()
{
if (dblClick)
{
count++;
if (count==2)
{
count = 0;
dblClick = false;
}
return;
}
var obj = document.getElementById('note');
if(obj.style.display == "block")
{
obj.style.display = "none";
}
else
{
obj.style.display = "block";
}
}
//]]>
</script>
</head>
<body>
<div onclick="setTimeout('showNote();',250,'JScript');" ondblclick="changeTitle(event);">
Mr. Note
</div>
<div id="note" style="display: none; text-align: left;">
Hello, I am a note.<br />
How are you? And what are you doing?<br />
<br />
If you want to change my tittle,<br />
then you just have to double click on it,<br />
type something new and hit enter.<br />
<br />
Yours truely, Note.
</div>
</body>
</html>