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,


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.

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.....

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.....

Use a onPress function

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.....

hi

try this

<html>
<body>
<form action='test3.htm'>
<input type=text name=text1>
<input type=text name=text2>
<input type=submit>
</form>
</body>
</html>

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

Use a onPress function

Should that not be onKeyPress?!?

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).

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 :)

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)"
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.