Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

enter key and onclick

This question is in two part, I don't believe in point sharing, so the first person to give me an acceptible answer that works will get the points.

1.) I want that whenever the enter key is pressed, the tab sequence is initiated to move the cursor from one field to the next.

2.) I have a form with some fields on it.  When the last field loses focus, I automatically created a group of text boxes, I also have a button to submit the form.  What I want to do is if the submit button is pressed, the form gets submitted, what is happenning instead is the new set of textbox gets created instead.  How can I solve this.
0
markcas
Asked:
markcas
  • 3
  • 2
1 Solution
 
tejaspuraniCommented:
answer 1.
http://javascript.internet.com/forms/tab-key-emulation.html

for the second one please post code.

T.P.
0
 
markcasAuthor Commented:
just the scenario
<html>
<body>
<input type='button' value='send' onclick='sendValue()'>
<input id='txtName' onblur='createNewTextBox()'>
<script language="javascript>
function sendValue()
{
   alert('Sending Values');
}

function createNewTextBox()
{
  alert('Creating New Text Box');
}
</script>
</body>
</html>
0
 
markcasAuthor Commented:
Have worked with some of the codes from the link that was posted by tejaspurani, and have solved both my problems
0
 
tejaspuraniCommented:
The Example above u gave works fine,
it creates new text box onblur and send the page info
onclick.

please post the actual code.

T.P.
0
 
tejaspuraniCommented:
The Example above u gave works fine,
it creates new text box onblur and send the page info
onclick.

please post the actual code.

T.P.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now