Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Any HTML experts?



["Stephen J. Turnbull" ([tlug] Any HTML experts?) writes:]
>> Jim Breen writes:
>> 
>>  > 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?
>> 
>> The HTML spec says nothing about this.  Ie, it's a user-agent thing,
>> AFAICS.  (I've always hated that behavior.)

Yes, it's a pity browser writers don't make it a configurable option.

>>  > There's probably a Javascript solution, but I'd prefer a vanilla
>>  > HTML one.
>> 
>> In this case use of a script looks like the most portable solution.
>> 
>> You can use the NOSCRIPT element and some CSS wizardry to present
>> either an input type="text" or a textarea in cases where scripts are
>> disabled.  Or if you don't trust the browsers to implement CSS or
>> expect users to override it, a more complex script should be feasible.

Unfortunately textareas look and behave a bit oddly. And I'm no wizard
with CSS.

Cheers

Jim

-- 
Jim Breen                                http://www.csse.monash.edu.au/~jwb/
Clayton School of Information Technology,               Tel: +61 3 9905 9554
Monash University, VIC 3800, Australia                  Fax: +61 3 9905 5146
(Monash Provider No. 00008C)                ジム・ブリーン@モナシュ大蛙触Â


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links