0

Hello everyone, I've ran into something that's been confusing me. Here's my code snippet:

if (parent.scrollTop < parent.scrollHeight)
	{
		if(document.fireEvent){  //IE
		   	setTimeout("document.fireEvent('onmousemove')", 10);
		}else{   //FF
		   	var changeEvent = document.createEvent("MouseEvents")
		   	changeEvent.initEvent("mousemove", true, true);
		   	setTimeout("document.dispatchEvent(changeEvent)", 10);
		 }
	}

What happens in Firefox is when the setTimeout fires, it tells me that changeEvent is undefined. To me, it seems to be defined. Has anyone run into this before and know how to work around it?
Thank you,

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by jmasta
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.