parentElement - web automation propety

IE automation property that returns the parent Element object of the current Element.

Applies to:
Element
  var e = elementObj.parentElement;
Arguments:
None.
Remarks:
If the current element has no parent IHTMLElement (it is the top element in the DOM hierarchy), then null is returned.
Example:
// Find the parent <form> element.
function FindParentForm(e)
{
	var f = e;
	while (true)
	{
		f = f.parentElement;
		if (f == null)
			break;
		
		if (f.nativeElement.tagName == "form")
			break;
	}

	return f;
}
		
See also:
Element | FindParentElement | parentBrowser | parentFrame

© 2017 CodeCentrix Software. All rights reserved.