| Partially disabling onclick?
This is a small problem that I can't think of a solution for. I have a section of code like this:
<li id="this1" onclick="some_function();"><a href="page.php"><img src="image.jpg" /></a></li>
What is happening at the moment is that the <li> defines an area on which an onclick action occurs. The <a> defines a link that surrounds an image inside the onclick area. So, when I click on the image, it takes me to the new page as intended, but the onclick function defined in <li> is also activated. It just looks a bit messy.
So, does anyone know how to disable the onclick function ONLY when clicking on the image (so it goes straight to the link without anything else happening), but still leaving onclick function active for the rest of the <li> area?
|