I know in general, to simulate an event for an object, we invoke that object's fireEvent() in IE or dispatchEvent() in FF.
But, I need to simulate a mouse click using IE on a client side image map. Which object should invoke the fireEvent()? It cannot be simply the [area> object since it could be referenced by 2 different [img>'s. It cannot be the [img> since we need a way to tell which part of the img is clicked which is defined in the [area] tag?
I've done some test with real mouse click on an client side image map. The event object generated from my click indicates (by the event.srcElement property) the event is generated from [area> tag. But when I tried to programmatically call the [area>'s fireEvent(), nothing happened!
Does IE actually support simulating click on a client side image map?
Never had to do it, can I ask why you need to do this? Might be a better solution.
posted 10 years ago
I know web unit test framework Selenium is using this approach for unit testing under IE.
Can you smell this for me? I think this tiny ad smells like blueberry pie!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop