I have several forms on a page all with an onsubmit handler doSomthing(). How can I access the form element that actually called the handler? How to pass it to the function.
<script>
function doSomthing( getThePassedElement ){
// Do some changes in the form values
return false;
}
</script>
<form action="#" onsubmit="doSomthing( PassSomthingHere )">
<input type="text" class="name">
<input type="submit">
</form>
<form action="#" onsubmit="doSomthing( PassSomthingHere )">
<input type="text" class="name">
<input type="submit">
</form>