Re: Default entry field focus
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.