• 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: Bill Reynolds <email@hidden>
  • Date: Thu, 08 Apr 2004 09:52:16 -0700

I use the same script on all my forms, put this in the 'head' of your
file...

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function putFocus(formInst, elementInst) {
 if (document.forms.length > 0) {
  document.forms[formInst].elements[elementInst].focus();
 }
}
// The second number in the "onLoad" command in the body
// tag determines the form's focus. Counting starts with '0'
//  End -->
</script>

...and put this in your body tag...

    <body onLoad="putFocus(0,0);">

HTH

-Bill




> From: Sam Barnum <email@hidden>
> Date: Thu, 8 Apr 2004 09:38:36 -0700
> To: Dale Gregory <email@hidden>
> Cc: webobjects devel list <email@hidden>
> Subject: Re: Default entry field focus
>
> It's a javascript issue.  Look at google's home page for an example, it
> uses the focus() method of the input.
>
> On Apr 8, 2004, at 9:05 AM, Dale Gregory wrote:
>
>> Hi all,
>>
>> Is there some way in a webobjects display component to have a certain
>> field in a WOForm be selected upon loading the page so the user
>> doesn't have to click in it before entering data in the
>> field?.....Thanks for any advice!.....Dale
>> _______________________________________________
>> 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.
> _______________________________________________
> 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.
_______________________________________________
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.


  • Follow-Ups:
    • Re: Default entry field focus
      • From: Dale Gregory <email@hidden>
  • Prev by Date: RE: Default entry field focus
  • Next by Date: Re: Sybase and EOModeler
  • Previous by thread: RE: Default entry field focus
  • Next by thread: Re: Default entry field focus
  • Index(es):
    • Date
    • Thread