[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Default Buitton when Enter Key Pressed

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
Nico2011
Asked:
Nico2011
  • 2
2 Solutions
 
jpgobertCommented:
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
 
Scott Fell, EE MVEDeveloperCommented:
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
 
jpgobertCommented:
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
 
Nico2011Author Commented:
Thank you both - it seems to work - not sure if all the time, but for now - fingers crossed!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now