Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Default Buitton when Enter Key Pressed

Posted on 2014-03-07
4
Medium Priority
?
204 Views
Last Modified: 2014-03-07
Hello,

I would like the form on the following page to be submitted when a user presses the enter key.  I know this should be simple (and hopefully will be!), but I simply don't seem to be able to get it to work...

The page can be seen here:

http://www.villasdirect.com

Thanks in advance.
0
Comment
Question by:Nico2011
  • 2
4 Comments
 
LVL 8

Assisted Solution

by:jpgobert
jpgobert earned 2000 total points
ID: 39911907
What have you tried?  

Have you tried setting the default button property in your form declaration line?

<form id="form1" class="refno" name="form1" method="post" defaultbutton="searchlocationrentals" action>
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39912150
It seems to work in chrome. There are some warnings in the js console although I don't think that would cause an issue.
0
 
LVL 8

Accepted Solution

by:
jpgobert earned 2000 total points
ID: 39912176
Your action attribute doesn't have a value... it was like that when I copied it earlier and forgot to mention it... can you update that and test again?
0
 

Author Closing Comment

by:Nico2011
ID: 39912212
Thank you both - it seems to work - not sure if all the time, but for now - fingers crossed!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
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)

886 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