Kristian wrote:
I came about something like this:
-------------------------------------------------------
<script>
function clickBg(e) {
evt = e || window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) // Safari bug
targ = targ.parentNode;
if (targ.id == 'body') {
window.open('http://example.com/');
}
</script>
</head>
<body onclick="clickBg(event);" id="body">
-------------------------------------------------------
I havent figured out how to control the cursor-style in different
browsers, but maybe i'll find a way :)
/kristian
document.getElementById('elementName').style.curso r='pointer';
A list of all the shapes are here:
http://www.quirksmode.org/css/cursor.html
And some non-standard (firefox/opera) shapes here:
http://www.worldtimzone.com/mozilla/...s3cursors.html
You don't need to use javascript either really unless you need to force
the issue. It's just a stylesheet tag.
<div style='cursor: crosshair'>
Now whenever the user moves over that division the cursor will change to
a crosshair.
Nice solution to your original problem btw.
--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA