
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tlug] Any HTML experts?
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.)
> 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.
Home |
Main Index |
Thread Index