954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

submit button

Hi,


Using enter key only,How to go to the next page in submit button(without clicking that button(onclick) , using the tabkey).Anyone can u help me.....

Thank you

muthumari
Newbie Poster
20 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

Hi,

Using enter key only,How to go to the next page in submit button(without clicking that button(onclick) , using the tabkey).Anyone can u help me.....

Thank you

hi muthu maari,

could u plz,elabrate your query little bit.

regards,

techkar.

techkar
Newbie Poster
18 posts since Feb 2006
Reputation Points: 10
Solved Threads: 1
 

Hi

I have 2 textbox(username,password) and one submit button.Whenever i clicking the submit button it will go to the next page or using tab key moment it will go to the next page.I want to know ,How to go to the next page in submit button(without clicking submit button , without using using the tab key)using enter key.Anyone can help me.....

muthumari
Newbie Poster
20 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

Hi

I have 2 textbox(username,password) and one submit button.Whenever i clicking the submit button it will go to the next page or using tab key moment it will go to the next page.I want to know ,How to go to the next page in submit button(without clicking submit button , without using using the tab key)using enter key.Anyone can help me.....

muthumari
Newbie Poster
20 posts since Mar 2006
Reputation Points: 10
Solved Threads: 0
 

Use a onPress function

cpweb
Newbie Poster
3 posts since Apr 2006
Reputation Points: 10
Solved Threads: 0
 
miteshb
Newbie Poster
2 posts since May 2006
Reputation Points: 10
Solved Threads: 0
 

no that is not what he wanted. he is not looking for html code. point is, take lazy user which doesn't like to move with mouse. after filling requered fields he only will press enter and by transfered to next page. Press enter work as long after typing password user pressed TAB to move to next field. But to move directly from password to next page you have to make key listener to listen for enter to be press

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 
Use a onPress function


Should that not be onKeyPress?!?

aniseed
Posting Whiz
359 posts since Apr 2006
Reputation Points: 48
Solved Threads: 7
 

The first submit button defined in the form has automatic keyboard focus for key events relating to the Enter key.
No need to do anything (unless you define your own higher level event handler to capture and discard those events of course, but then tabbing to the button and pressing space will activate it).

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

Insert the following code in your page_load it will be worked
TextBox2.Attributes.Add ("onkeydown","if(window.event.keyCode==13){document.getElementById('"+Button3.UniqueID+"').click();return false;} else{return true};");

It will be attach the texbox event with the button click.
Have a nice time :)

kawatra
Newbie Poster
1 post since Aug 2006
Reputation Points: 10
Solved Threads: 0
 

Hi
try to use a onKeyDown event. This option will append a moderately long javascript script to check for the enter key on each button press. If the button is pressed, it activates the form submit. To use this, place this script in the head.

<script type="text/javascript">

function submitFormWithEnter(myfield,e)
{
   var keycode;
   if (window.event)
   {
      keycode = window.event.keyCode;
   }
   else if (e)
   {
      keycode = e.which;
   }
   else
   {
      return true;
   }

   if (keycode == 13)
   {
      myfield.form.submit();
      return false;
   }
   else
   {
      return true;
   }
}
</script>

Finally, on the last input textbox, use the following:

onKeyPress="return submitFormWithEnter(this,event)"
sravanthi07
Newbie Poster
1 post since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You