G
George Hester
I mean right-click. Sorry for the dyslexia attack.
--
George Hester
__________________________________
Well I do it with activeElement. Like this:
if (document.activeElement.getAttribute('id') == 'oBody'){
oBody.focus();
} else if (document.activeElement.getAttribute('id') == 'UID'){
ctrlUID.focus();
......
}
In this case there are two elements on the page oBody obviously the id for the body element (that is your active element when the Context Menu closes) and ctrlUID that is a text box with id = 'UID'. I believe in your case you could change oBody.focus() to ctrlUID.focus();. I actually have to do this throughout my control scripts (on 2 of them) because I get a nasty bug (IE 5.5) where key down events don't fire on the first keydown. But require two keydowns before the keydown event fires correctly. It's a bitch and this that you see above is my workaround for the issue. Likely an array holding all the 'ids' on the page would be a better soulution or a switch. Yeah maybe let me try that. Thanks a switch that'll do it.
Oh but the lett-click oh crap. I don't know I gave up on that. I couldn't get the left-click on keydown to fire correctly. Sorry no HTH but I tried.
--
George Hester
__________________________________
Well I do it with activeElement. Like this:
if (document.activeElement.getAttribute('id') == 'oBody'){
oBody.focus();
} else if (document.activeElement.getAttribute('id') == 'UID'){
ctrlUID.focus();
......
}
In this case there are two elements on the page oBody obviously the id for the body element (that is your active element when the Context Menu closes) and ctrlUID that is a text box with id = 'UID'. I believe in your case you could change oBody.focus() to ctrlUID.focus();. I actually have to do this throughout my control scripts (on 2 of them) because I get a nasty bug (IE 5.5) where key down events don't fire on the first keydown. But require two keydowns before the keydown event fires correctly. It's a bitch and this that you see above is my workaround for the issue. Likely an array holding all the 'ids' on the page would be a better soulution or a switch. Yeah maybe let me try that. Thanks a switch that'll do it.
Oh but the lett-click oh crap. I don't know I gave up on that. I couldn't get the left-click on keydown to fire correctly. Sorry no HTH but I tried.