Forum Moderators: open
[edited by: Fotiman at 1:46 pm (utc) on Feb 18, 2010]
[edit reason] Examplified URL [/edit]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!-- doctype on one line -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Untitled</title>
<script type = "text/javascript">
window.onload=function() {
if (document.getElementById('chk1')) {
document.getElementById('chk1').onclick=function() { newPage(this); };
}
};
function newPage(chkObj) {
if (chkObj.checked) {
var day = new Date();
var id = day.getTime();
var params = 'top=80,left=100,screenX=100,screenY=80,width=550,height=460,scrollbars,resizable';
var win = open(chkObj.value,id,params);
}
}
</script>
</head>
<body>
<form action="">
<input type="checkbox" name="chk1" id="chk1" value="http://www.example.com">
</form>
</body>
</html>