Hi,

Having problems with getting the enter key to act as a tab key.

It works fine in internet explorer with this code:

<body onkeydown="javascript:if(event.keyCode == 13) event.keyCode = 9;">

However, if I try to it for the other browsers by using event.which it picks up that keycode 13(enter key) was pressed but won't change the value to 9.

<body onkeydown="javascript:if(event.which == 13) event.which=9;">

Any ideas what I'm doing wrong?

Thanks

I think you'll have to fire a new event, with keycode 9.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.