Solved

Default Buitton when Enter Key Pressed

Posted on 2014-03-07
4
187 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 500 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 52

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 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

760 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

20 Experts available now in Live!

Get 1:1 Help Now