Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i have two text boxes in my appilication,first iam in first textbox1 when i pressed enter key that pointer will automatically focius to second text box ,how to this work
Posted
Comments
senguptaamlan 27-Mar-12 5:09am    
Use Javascript....and frankly speaking it will be great if you can post your code.

That is a very bad idea.
Enter is not a key that the user expects to use to go from box to box - he expectes it to submit the form, or press a button, or start a new line in a textbox.

If you do implement this, then you are going to confuse, and annoy users who expect a particular behaviour, and have to remember that your application is "different". The general result of this depends on the users expertise level:

High: Delete the app, yell at the company that produced it.
Medium: write down the behaviour so they can try to remember, and complain to each other that this app is useless.
Low: Stop using the app.

Please, do not go away from established user interface statndards - they are called "standards" for a reason! Would you be happy if one of my apps used CTRL-C for "Clear" and moved Copy to CTRL-Z?
 
Share this answer
 
Comments
Member 13462547 17-Oct-17 1:30am    
Sir,
There are many GST softwares on which its necessary to work ENTER BUTTON as a TAB BUTTON.
Whilst it is against the agreed standards of use, you are asking a question many have asked before.


Put this in the head:
XML
<script language="javascript" type="text/javascript">

    function EnterTab(e) {
        var intKey = window.Event ? e.which : e.KeyCode;


        if(intKey == 13)
            e.returnValue = false;
    }
</script>



And in the body tag:
<body onkeydown="EnterTab(event);">
 
Share this answer
 
Comments
araveendrareddy 27-Mar-12 5:47am    
hi how can we use this script
Dalek Dave 27-Mar-12 6:21am    
If you read what I say you will see what to do.

Put the first bit of code in your header section, the second in body, (or in the form etc), it is really rather easy to do.
araveendrareddy 27-Mar-12 5:51am    
no this is not a solution for my question, please find out address for this question
Dalek Dave 27-Mar-12 6:20am    
You didn't give a lot of information, or any code.
How the hell are we to know what you want exactly?
I am not psychic.

And what do you mean about the "Address for this Question"?
Please explain.

I am trying to help, but you are making it hard.
You need to look at putting in TabIndex in your controls

Have a look at this StackOverflow: Is there a way to set Tab Order in ASP.net?[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900