?
Solved

Form Order

Posted on 2003-10-22
3
Medium Priority
?
160 Views
Last Modified: 2010-04-09
I have created a page with a form that is submitted via a button click that runs a javascript function which calls the form.submit() method.

When I fill in information into a textbox on the form, I would like the form to submit when I press ENTER (like yahoo). However, the page merely refreshes itself. I tried setting the tab order of the button (which is type="button") to 1 but that does not seem to help either. Any suggestions?
0
Comment
Question by:edesmarais
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:proziath
ID: 9602492
Is it possible you could show us the code?

My thinking is that a normal submit for would have a button of type SUBMIT and on clicking this button it should submit with no problems. If you want to run a javascript function for whatever purpose then it iwould be activated using the onsubmit event.
0
 
LVL 2

Expert Comment

by:proziath
ID: 9602493
Is it possible you could show us the code?

My thinking is that a normal submit for would have a button of type SUBMIT and on clicking this button it should submit with no problems. If you want to run a javascript function for whatever purpose then it iwould be activated using the onsubmit event.
0
 
LVL 58

Accepted Solution

by:
Gary earned 200 total points
ID: 9603797
Have you set an Action in the Form tag?

<script language=javascript>
function FormSubmit(){
document.myform.submit()
}
</script>
<form name="myform" action="nextpage.asp" method="POST">
<input type=button name=Submit onclick=FormSubmit()>
</form>
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

770 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