We apologize for the interruption. However, seabreezecomputers.com has been offering free tools and downloads for many years. Unfortunately, server expenses are now starting to exceed revenue earned. If you appreciate the free tools and downloads at seabreezcomputers.com please consider making a donation.
Include the js files in your html document by adding the following lines near the top of your document:
Impose Max Length
The file impose_max_length.js makes it possible to add a maxlength attribute to an html
textarea (which normally does not support maxlength). If a user types or pastes more than
the maxlength characters in the textarea then the input will stop. The function will
also calculate the number of characters and put it in a span with id of "num_letters" if you
include that span. Add a textarea to your document with
the following attributes to call the function:
Stop Enter Key
The function will allow the enter key to sumbit the form if it is on a type="submit" button or if you add the custom attribute data-allowsubmit="true" to an input element such as a login password. Example: <input data-allowsubmit="true" autocapitalize="off" type="password" name="password" size="50" maxlength="50">
The function also allows the enter key to act as a normal enter key (adding linebreaks) in a textarea.
Autofocus on first element
Notice that the first input element in the sample form has the autofocus attribute in it.
This will cause the cursor to appear in this form element when the page loads so the user can
start typing without having to click in the element. This works in Internet Explorer 10, Firefox,
Opera, Chrome, and Safari. However in previous versions of Internet Explorer this will not work without
with id="first" to be focused on when the page loads:
iPhone and HTML5 autocapitalize, autocorrect, and spellcheck
On smartphones like iPhone and Android phones you will want to turn off autocaptialize for fields such as email fields and you will want to disable autocorrect on username or display name fields. You can do this by adding autocapitalize="off" autocorrect="off" attributes to the input tag. For HTML5 which Chrome and other browsers use you'll want to add spellcheck="false".
Keyboard with Email @ Symbol
On smartphones like iPhone and Android phones for email inputs change the type to type="email" instead of type="text". This will display a custom keyboard with both a . and @ symbol.
Last updated on