How to get the form name when peress a button inside the form ? document.forms[0].name will do the job only if i have one form. How about for multiple forms ?
FORM:
<form name="aaa">
<input type="button" name="submit" value="Submit Form" onclick="somefunction();">
</form>
FUNCTION:
<script>
function somefunction()
{
var thename=document.forms[0].name;
alert (thename);
}
</script>