Ok, I have been playing since I'm kinda in a hurry and I have come up with a semi working solution:
<html>
<head>
<script type="text/javascript">
function shrink(el) {
pxWidth = el.offsetWidth
pxHeight = el.offsetHeight
el.style.width = pxWidth-1+'px'
el.style.height = pxHeight-1+'px'
setTimeout('shrink('+el+')',500);
}
</script>
</head>
<body>
<div style="width:35px;height:35px;background:#CCCCCC" onmouseover="shrink(this);"></div>
</body>
</html>
The problem is that it doesn't keep shrinking - it throws an error, now I think I know why it does this, but I have no idea how to fix it (I'm iffy with the 'this' declaration) tho I didn't particularly want to have to use the document.getElementById('whatever') method instead.
Also I'm a little worried that if I have this onmouseover function applied to multiple objects on the page that each time a new object is moused over then it will cease the function on the previous objects currently 'shrinking'.
Some help would be much appreciated.
Thanks again guys,
Jon
[This message has been edited by smonkey (edited 10-09-2003).]