3 out of 5 rated this helpful - Rate this topic

fromElement Property

Gets or sets the object from which activation or the mouse pointer is exiting during the event.

Syntax

[ oObject = ] object.fromElement

Possible Values

oObject Object that specifies or receives the previous location of activation or the mouse pointer.

The property is read/write. The property has no default value.

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are supported in IE7 Standards mode and IE5 (Quirks) mode only. For more information, see About Dynamic Properties and Defining Document Compatibility.

Remarks

The property is read-only in Microsoft Internet Explorer 4.0, and read/write in Internet Explorer 5 and later.

Example

In this example, the alert returns "mouse arrived" when the mouse pointer moves over the button.


<SCRIPT>
function testMouse(oObject) {
	if(!oObject.contains(event.fromElement)) {
		alert("mouse arrived");
	}
}
</SCRIPT>
:
<BUTTON ID=oButton onmouseover="testMouse(this)">Mouse Over This.</BUTTON>

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/fromElement.htm

Standards Information

There is no public standard that applies to this property.

Applies To

event, Event Constructor
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ