You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jeremy Nix <Je...@sfsltd.com> on 2003/06/25 16:30:31 UTC

Setting focus on a field that referring to a deed property

Okay, I have an object on my ActionForm that is a container object for
many other objects.  So, within my form you will see a lot of property
names like: a.b.c, a.b.d, etc...  This works great and all my properties
are properly reflected upon, but I'm having a small issue trying to
figure out how to set the focus on one of these fields.  I also have a
an arraylist that I'm populating so some of my fields will be like:
a.b.e[0].f, a.b.e[1].f, etc...  So, generally you do something like:
document.form.field.focus().  Well, I tried this for the non-array case,
and the array-based case and both create a javascript error because the
field looks as if its trying to access an unknown property.  Is there
some trick to making JavaScript understand that a.b.c or a.b.e[0].f is
the fieldname and not an object?

I guess you could say this is more of a general HTML question, but I
figured somebody in here has tried to do the same thing.

_________________
Jeremy Nix
Senior Application Developer
Southwest Financial Ltd.
Jeremy.Nix@sfsltd.com
(513) 621-6699 ext 1158