I'm having trouble with e.preventDefault() for IE(8).
Everything works in Chrome (meaning the execution is correct, and the default action is prevented). However, in IE, the execution is correct but the default action happens as well.
In further investigation I found that whenever I look at the event object, it fails (no error, just exits the handler quietly).
I removed all the code and boiled it down as follows:
google.earth.addEventListener(spot.placemark, 'click', test);
function test(e){
alert(1);
e.returnValue = false;
alert(2);
if(e.preventDefault) e.preventDefault();
alert(3);
return(false);
}
So with IE, only the first alert fires. With chrome they all fire. If I reverse alert 2 and alert 3, still only alert 1 fires. Fundamentally - touching e fails.
I also tried using the window.event object instead of relying on the passed value of e.
var e = window.event;
But that had the same effect. Appreciate some pointers. Thank you