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.

Within the body element of the webpage, add:

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; } } } 
// -->

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.
 | | | Project Background | Feedback. Copyright©David Novak 2002.