datactrl wrote:
I put the following code on "onkeydown".
var my1 = document.createEventObject(event);
my1.keyCode = 9;
my1.shiftKey = true;
event.srcElement.fireEvent("on"+event.type,my1);
event.keyCode = 0;
event.returnValue=false;
When I trace it, it does go to fireEvent. But it didn't work as shift+tab.
From your description I can only guess what you are trying to
accomplish, so here is my advice:
Do not try to mess with the user interface. Users expect keys to work
as they are used to. If they want the functionality of (Shift+)Tab
(to focus the previous/next interactive element) they will press
(Shift+)Tab. If they want to submit a form, they will press Enter.
Besides, your code works in IE only.
PointedEars