1.
Code:
<script language='javascript'>
function popup()
{
var thsCookieCount = readCookie('myCounter');
if (thsCookieCount){
if (thsCookieCount >2) newWindow();
}
}
function newWindow()
{
window.open(url,name, parameters);
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
</script>
</head>
<body onload="popup();">
2. For this I would recommend using an external js file and call functions in that file, rather than attempting to write js between windows
3. onKeyPress, onKeyDown, onKeyUp, onFocus are all functions that you could us
4. add them to a hidden field or append them to the url in form action
_________________
Lostboy
Cat, the other other white meat
Please read
Posting Etiquette before posting
You can always try
Google