Posted by Anonymous Wed 21st Mar 2007 17:15 - Syntax is JavaScript - 29 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
-
function getParentForm(obj) {
-
//returns form, that is parent of obj.
-
//if no parent is form, returns null.
-
-
if(!obj.parentNode) {
-
return null;
-
}
-
if( obj.tagName == 'FORM' ) {
-
return obj;
-
}
-
return getParentForm(obj.parentNode);
-
}
PermaLink to this entry https://pastebin.co.uk/12125
Posted by Anonymous Wed 21st Mar 2007 17:15 - Syntax is JavaScript - 29 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Comments: 0