WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
Internet Security Software
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : How to get the Focus (Cursor) into a Form-Element.
Categories : HTML, Java Script Update Picture
Michael Taupitz
Date : Apr 28th 2000
Grade : 4 of 5 (graded 5 times)
Viewed : 26309
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Michael Taupitz
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

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:)



Bookmarklets are simple tools that extend the surf and search capabilities of Netscape and Explorer web browsers.
Categories : Java Script, HTML, General
Javascript linked dropdowns
Categories : Java Script, HTML, Classes and Objects
Javascript animated menu items
Categories : DHTML, CSS, Java Script, HTML
Bouncing Marquee at Status Bar
Categories : Java Script, HTML, Browsers
Check if Javascript is Enabled or Disabled - Works in all Browsers
Categories : Java Script, HTML, Web Browsers
Page Loading Message shown during the time your site's page is being loaded.
Categories : HTML, CSS, Java Script
Javascript Background Scroller
Categories : Java Script, CSS, HTML
Prevent Right Mouse steal your graphics
Categories : HTML, Java Script, Security
Using innerHTML In Order To Copy Content From One Page To Another
Categories : HTML, Java Script
Clock at Status Bar
Categories : Java Script, HTML, Date Time
How to create <SELECT> menues that change on the fly according to other <SELECT> menues on the page?
Categories : Java Script, HTML
Table editable dynamic form with edit + selection (select / option) + checkbox.
Categories : Java Script, DHTML, User Interface, CSS, HTML
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
Mordern Peroidic Table - Science
Categories : Java Script, HTML, Charts and Graphs
Builds JavaScript that updates the contents of one selector based on another.
Categories : HTML, Java Script, PHP, Complete Programs, General
 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:

&lt;form name=myForm&gt;
&lt;input type=text name=myTextBox&gt;
&lt;/form&gt;

you might want to write a function like this:

&lt;script language=javascript&gt;
&lt;!--
  function focusUser() {
    document.forms[`myForm`].elements
[`myTextBox`].focus();
  }
//--&gt;
&lt;/script&gt;

then in your body tag:

&lt;body onLoad="javascript:focusUser();"&gt;

One webpage that uses this fairly often is "GOOGLE" 
http://www.google.com.  I really like not ever having to 
touch the mouse.