Solved

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

Posted on 2009-05-03
3
370 Views
Last Modified: 2012-05-06
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.
0
Comment
Question by:alicia1234
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
IanTh earned 250 total points
ID: 24290373
0
 
LVL 30

Assisted Solution

by:IanTh
IanTh earned 250 total points
ID: 24290389
0
 

Author Comment

by:alicia1234
ID: 24290800
Thanks! Worked great!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
fix wrap around navigation on tablet device 3 31
Hover Gone 16 31
updateParent() HTML Javascript 21 61
HTML page and JavaScript 2 55
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 …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

762 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

18 Experts available now in Live!

Get 1:1 Help Now