Remove 'onclick' command from a child of a div
html, javascript
Solution
You need to stop the bubbling of the event up the hierarchy ...
using the onclick attribute you can do this with
`onclick="event.cancelBubble=true;if(event.stopPropagation) event.stopPropagation();return false;"` on the select element.
Problem
I am working on a website where I have a main `div`. I wanted all of the `div`'s page-area to act as a link (clicking on it will cause a submitting of a form and moving to another page) so I added to that `div` the attribute: ``` <div class="box1" onclick="javascript:document.forms['womenForm'].submit();" ...> ``` Everything in this area shuold link to the next page apart from an HTML selection that is inside this div, but should be clickable without moving to the next page. How can I cause this to happen? I tried to wrap the selected element with a div, giving it `href=""` or `onclick=""` but still the form is submitted. Can anybody resolve this?