• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Default entry field focus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default entry field focus


  • Subject: Re: Default entry field focus
  • From: Calven Eggert <email@hidden>
  • Date: Thu, 08 Apr 2004 14:12:00 -0400

I put this script in the WOComponent:

function focusOnFirstField() {
    //put focus on the firstfield input field if it exists
    if (window.document.firstform != null) {
        if (window.document.firstform.firstfield != null) {
            window.document.firstform.firstfield.focus();
        }
    }
}


Then on each page I add the name binding to the form on the page and the
field I want to focus on:

Form: WOForm {
    multipleSubmit = true;
    name = "firstform";
}

Name: WOTextField {
    value = currentMailing.name;
    name = "firstfield";
}


Have fun.
Calven.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Question on WebObjects compatibility with Windows operating systems
  • Next by Date: Re: Question on WebObjects compatibility with Windows operating systems
  • Previous by thread: Re: Default entry field focus
  • Next by thread: Q: Views with EOF
  • Index(es):
    • Date
    • Thread