troubleshooting Question

Submit Form Using Enter Or Clicking Submit

Avatar of Ryan Rood
Ryan RoodFlag for Canada asked on
PHPScripting Languages
34 Comments3 Solutions1754 ViewsLast Modified:

I have a form that I am submitting (see code attached), however when I press enter it just refreshes the page and doesn't actually submit the form. I find this very inconvenient as I myself always use the enter key. We use IE6 or IE7.

Any advice on how to correct this behaviour?

<title>Customer Search</title>
<body background="../background.png" onLoad=dofo() alink="blue" vlink="blue">
<script type="text/javascript">
function dofo() {;
<div align="center">
<a href="http://intranet/search"><img src="../logo.png" border="0" alt=""></a>
	<td><a href="#" onClick="history.go(-1)">Back</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://intranet" alt="Intranet Home">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="list_all.php">Show All</a></td>
<form name="fo" method="POST" action="search.php">
		<strong>Enter Customer Information</strong><br><br>
		<input type="text" name="keyword" size="20" maxlength="100">
		<input type="submit" name="submit" value="Search" />

Open in new window


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 34 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 34 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros