Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Web Design, HTML And CSS Forums (http://www.go4expert.com/forums/web-design-forum/)
-   -   How to convert enter key with tab key functionality in onkeyup event (http://www.go4expert.com/forums/convert-enter-key-tab-key-functionality-t9097/)

rekha 29Feb2008 15:17

How to convert enter key with tab key functionality in onkeyup event
 
Hi

I have a form In that form when i press enter key in first field it will go to second field and could not submit the form.How can i do this?



Regards
Rekha

rekha 4Mar2008 18:00

Re: How to convert enter key with tab key functionality in onkeyup event
 
Hi

Any answers.......I need quickly.



Regards
Rekha

rekha 5Mar2008 16:40

Re: How to convert enter key with tab key functionality in onkeyup event
 
Hi

Nobody knows the solution for this ah.........



Regards
Rekha

aisha.ansari84 5Mar2008 16:54

Re: How to convert enter key with tab key functionality in onkeyup event
 
you are wrong rekha there are experts in this form and they will surely solve your problem

rekha 10Mar2008 16:10

Re: How to convert enter key with tab key functionality in onkeyup event
 
Hi

I didn't mean in that way.I want to solve this quickly.If anybody knows the solution for this pls answer me quickly.



Regards
Rekha

pradeep 10Mar2008 18:13

Re: How to convert enter key with tab key functionality in onkeyup event
 
HTML Code:

<script>
function handleEnter(e)
{
        var characterCode;
        if(e && e.which)
        {
                e = e;
                characterCode = e.which;
        }
        else
        {
                e = event;
                characterCode = e.keyCode;
        }

        if(characterCode == 13)
        {
                document.getElementById('nextfield').focus();
                return false;
        }
        else
        {
                return true;
        }
}
 </script>
 <input type="text" id="firstfield" onkeypress="return handleEnter(event);" />
 <input type="text" id="nextfield" />



All times are GMT +5.5. The time now is 09:36.