Peter's image hover question
Peter was trying to make a border appear around his images when the user hovered over them. His solution was to put anchors around his images so he could use the a and a:hover CSS classes to define border styles for the hover states.
Unfortunately, he didn't want the page to reload or change its position when the image was clicked. Without the href property, the hover states did not work in IE, but with # in the href property, the page would jump back to the top.
There was a bug with using javascript to change the CSS class of image because the DOM element was dynamically generated, so using javascript to change the className was not a viable option.
In the end, Peter came up with a hack to do the trick.
(4:44:50 PM) Peter Chang: you can do something like this
(4:45:11 PM) Peter Chang: <a href="doVoid()" onclick="myFunction(); return false" ...
(4:45:26 PM) Peter Chang: the href doesnt' go anywhere.. i thin because you rturn false on click
(4:45:39 PM) winonatong: i didn't know you could put javascript in the href
(4:45:41 PM) Peter Chang: i'm not even sure if it execs dovoid
(4:45:44 PM) Peter Chang: i know!
(4:45:59 PM) winonatong: that's a nifty hack
(4:46:29 PM) Peter Chang: actually you can have just junk in the href
(4:46:38 PM) Peter Chang: i guess the return false prevents the forwarding