Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Any HTML experts?
- Date: Sat, 6 Jan 2007 21:26:02 -0800
- From: "Jesse Costa" <dazeysan@example.com>
- Subject: Re: [tlug] Any HTML experts?
- References: <200701070229.l072TBDE015163@example.com>
On 1/6/07, Jim Breen <Jim.Breen@example.com> wrote:I've RTFMed (RedTFM?) but I haven't found an answer to this.
In HTML forms, is there any way to stop the pressing of the Enter
key after putting in text in a <input type="text" .... > box from
sending in the whole form? Basically I'd like the *only* way for the
form to be sent is the pressing of the <INPUT type="submit" .... >
button.
I'm reluctant to change over to <textarea ....> boxes, because I
really only want single-line input.
There's probably a _javascript_ solution, but I'd prefer a vanilla
HTML one.
TIA
Jim
I don't think it can be done with vanilla HTML, but this has very little _javascript_ and it's all in the tags, no extra <script> at the top:
<form name="myform" action="" method="get" false;">
<input type="text" name="text1" />
<input type="button" value="Submit" />
</form>
In the form tag, false;" will prevent the Enter key and submit buttons from working. A plain button, rather than a Submit button, with the onClick event shown above will then submit the form. This will only respond to a direct click on the button or the Enter key when the button has focus.
HTH
Jesse
- Follow-Ups:
- Re: [tlug] Any HTML experts?
- From: Walter Hansen
- References:
- [tlug] Any HTML experts?
- From: Jim Breen
Home | Main Index | Thread Index
- Prev by Date: [tlug] Any HTML experts?
- Next by Date: Re: [tlug] linux in Japanese schools
- Previous by thread: [tlug] Any HTML experts?
- Next by thread: Re: [tlug] Any HTML experts?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links