I have the following form:
<form id="formId">
<!-- some tags -->
<div>
<!-- some other divs or something else -->
<input type="radio" onclick="handler(this) />
</div>
</form>
Where the function handler looks like:
var handler = function(elem){
init();
var clicked = //here should be form id
//other staff
};
How to get the id of the enclosed form? Assume that there's only one form on the web-page.
I'm looking for pure-js as well as jQuery solutions.