Solved

enter key and onclick

Posted on 2002-06-13
5
203 Views
Last Modified: 2011-09-20
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
Comment
Question by:markcas
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
tejaspurani earned 50 total points
Comment Utility
answer 1.
http://javascript.internet.com/forms/tab-key-emulation.html

for the second one please post code.

T.P.
0
 

Author Comment

by:markcas
Comment Utility
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
 

Author Comment

by:markcas
Comment Utility
Have worked with some of the codes from the link that was posted by tejaspurani, and have solved both my problems
0
 
LVL 3

Expert Comment

by:tejaspurani
Comment Utility
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
 
LVL 3

Expert Comment

by:tejaspurani
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now