My code works fine in FF/Chrome/Everything except IE(failed in both 7/8, didn\'t bother going furthur down). Due to restrictions, I cannot use jQuery and am hard-coding the
In IE the event object is not passed as the first argument to an event handler. Instead it is a global variable:
function mousedown(e){
var evt = e || window.event; // IE compatibility
if(evt.preventDefault){
evt.preventDefault();
}else{
evt.returnValue = false;
evt.cancelBubble=true;
}
//Processing
};
IE has a different event model to other browsers (even IE8). In IE you would call this to do the same thing:
event.returnValue = false;
You need to determine what the browser supports and call the correct method. So first check if event.returnValue is set, if so then call it, otherwise call preventDefault().