|
|
|
To make your Forms more User-Friendly, you can put the Cursor in a Text-Field after loading
your Site. Its easy to with JavaScript. Put the following Snippet at the end of your HTML-Body.
(before </BODY> )
---- snipp ---
<script language="JavaScript">
<!--
if (document.<FormName>) {
document.<FormName>.<ElementName>.focus();
}
// -->
</script>
---- snapp ---
Insert instead of <FormName> the Name of your Form (specified in your FORM-Tag !),
and instead of <ElementName> the Name of the Form-Element. (Maybe a Text-Field).
(:Mike:) |
|
| Builds JavaScript that updates the contents of one selector based on another. Categories : HTML, Java Script, PHP, Complete Programs, General | | | Using innerHTML In Order To Copy Content From One Page To Another Categories : HTML, Java Script | | | Javascript Background Scroller Categories : Java Script, CSS, HTML | | | How to create <SELECT> menues that change on the fly according to other <SELECT> menues on the page? Categories : Java Script, HTML | | | Prevent Right Mouse steal your graphics Categories : HTML, Java Script, Security | | | Cool tool tip Categories : Java Script, HTML, Web Design | | | Conditional Check - a script that allows a user to submit a form only if the user check a checkbox. Categories : HTML, Java Script, Form Processing, Beginner Guides | | | Javascript linked dropdowns Categories : Java Script, HTML, Classes and Objects | | | Javascript animated menu items Categories : DHTML, CSS, Java Script, HTML | | | Page Loading Message shown during the time your site's page is being loaded. Categories : HTML, CSS, Java Script | | | Bookmarklets are simple tools that extend the surf and
search capabilities of Netscape and Explorer web browsers. Categories : Java Script, HTML, General | | | complete simply working javascript password generator file. Use letter, vowels, consonants (uppercase and lowercase) arrays to create a really random and secure password.
improved security using time functions to initialize random number generator. Categories : Java Script, HTML, Security, Authentication, Strings | | | Higly Customizable Javascript Calendar Script Categories : Java Script, Calendar, Date Time, HTML, CSS | | | Show or Hide your Content using Javascript Categories : Java Script, HTML, CSS, Beginner Guides | | | Bouncing Marquee at Status Bar Categories : Java Script, HTML, Browsers | |
| | | | Robin Curts wrote :363
This is a great thing for javascript. It`s wonderful to use
it for these little tasks. They really change the flow of
the page.
One tip is to use this function in the onLoad event in
your BODY tag.
If you have:
<form name=myForm>
<input type=text name=myTextBox>
</form>
you might want to write a function like this:
<script language=javascript>
<!--
function focusUser() {
document.forms[`myForm`].elements
[`myTextBox`].focus();
}
//-->
</script>
then in your body tag:
<body onLoad="javascript:focusUser();">
One webpage that uses this fairly often is "GOOGLE"
http://www.google.com. I really like not ever having to
touch the mouse.
| |
|
|
|