Link to home
Start Free TrialLog in
Avatar of alicia1234
alicia1234Flag for United States of America

asked on

How do I disable a carriage return from submitting a form and how do I set focus?

I have a form with one field in it. If I enter a value in the field and hit tab, it just takes the focus off the field. I want the carriage return to do the same thing. Currently, the carriage return submits the form.

Also, when the user comes into the form, I want to set the focus on the field (move the cursor to it).

I know this should be easy, but I've searched for a solution and haven't found it. And I'm brain dead right now and under a deadline so I need help!

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of IanTh
IanTh
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alicia1234

ASKER

Thanks! Worked great!