Hi,
i need to get a reference to the FORM parent of an INPUT when I only have a reference to that INPUT. Is this possible with javascript (or else jQuery) ?
function doSomething(element) {
//element is input object
//how to get reference to form?
}
This doesn't work:
var form = $(element).parents('form:first');
alert($(form).attr("name"));