None of the objects highlighted are supported by IE as far as I know, the red ones I am certain are not:
Code:
HTMLAnchorElement.prototype.doMouseOver = function() {
var evt = this.ownerDocument.createEvent('MouseEvents');
evt.initMouseEvent('mouseover', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
this.dispatchEvent(evt);
}
Neither by the way is the 'e' event model. In fact, other objects in the above may also be unsupported in IE.
However, under these specific (and similar event) circumstances, the following (and some variations) is/are possible cross browser:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function myfunc(e){
e = e? e : window.event;
var t = e.target? e.target : e.srcElement;
alert(t.innerHTML);
}
function spoofover(id){
var spoof = {target:document.getElementById(id)};
spoof.target.onmouseover(spoof);
}
window.onload = function(){
document.getElementById('test').onmouseover = myfunc;
}
</script>
</head>
<body>
<span id="test">Hi</span><br>
<input type="button" value="Spoof" onclick="spoofover('test');">
</body>
</html>
And I believe this would be a good spoofover for this menu script:
Code:
function spoofover(id){
var el = document.getElementById(id);
var spoof = {type:'mouseover'};
el.onmouseover(el, spoof, el.rel);
}
But even then, the mouse will not be over the trigger, so unexpected things might happen. All in all, a custom function that triggers the menu the way that you want it to be triggered via hot key might be best. That, or a modification to the dropit:function to get it to recognise and interpret input from key stroke (document.onkeydown) events.
Still more worries, there are many browsers out there that can use this menu, not just IE and FF. Those are mentioned in the code, but in reality other browsers like Safari, Opera, etc. can use the menu. Every browser already has hot keys reserved, and these vary from browser to browser, so in the end, this whole idea might be pointless.
Bookmarks