Forum Moderators: open
<SPAN style="cursor: hand">
your
body
text
here
<SPAN>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head> <script language="JavaScript">
function window_click()
{
alert('mouse_click event!');
}
</script> <body onClick="window_click()">
</body>
</html> BTW: sorry for taking all this time but I was in a meeting.
Hope this is what you need. :)
d#Nimrod
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html><head>
<title>body onclick test</title>
</head>
<body onclick="window.location.href='newpage.html';" style="cursor:pointer;">
<h1>onclick test</h1>
<p>test</p>
</body>
</html>
Note: I used
cursor:pointer; rather than cursor:hand; as it is the valid way to define the cursor in CSS. If it is still not working for you, check your syntax and make sure you've got all the right quote marks in the right places. The only line you need from the above example is the line in bold, replacing the
body tag on your existing page.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html><head>
<title>body onclick test</title>
</head>
<body onclick="window.location.href='newpage.html';" style="cursor:pointer; width:100%; height:100%;">
<h1>onclick test</h1>
<p>test</p>
</body>
</html>
Should work for the whole page even if the content only half-fills it.