I was recently bitten by javascript: void (null); error in my hrefs when applied to images.
In my version of Safari (4.0.3 in Leopard PPC), when I use href javascript: void (null); around the image, the image completely disappears from the layout. Looking around, I see that this is happening in IE as well, although I cannot confirm.
I read using the pound sign (#) with the onclick handler
onclick="return false;"
This works, but I hate the pound attached to the url.
I know that there are various methods. So how do you handle your hrefs?
source
share