toto article listarticle list
Research Commentary on the Spire Project

Scripts for Article on Adapting Forms.
By David Novak

To add focus to the a form, I use a little javascript routine that is run when the page is run.

Step#1
Within the body element of the webpage, add:

Step#2
Place within the body of the document:

<script language=javascript><!--
function firstFocus() {
  if (document.forms.length > 0)  {
    var TForm = document.forms[0];
    for (i=0;i<TForm.length;i++)  {
      if (TForm.elements[i].type=="text") {
        document.forms[0].elements[i].focus(); break; } } } 
}
// -->
</script>

to article listThe Spire Project - better ways to find information.
Like this? You should attend our public seminar and receive our bi-monthly update notice.
 | SpireProject.com | SpireProject.co.uk | Project Background | Feedback. Copyright©David Novak 2002.