Thanks.  That works well.  I didn't see that in my
documentation: ClientReferenceJS13.pdf. :)  But hey,
I'll take anything that's clear, simple, and works.

-David

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of news.gmane.org
Sent: Wednesday, September 10, 2003 3:24 PM
To: [EMAIL PROTECTED]
Subject: Re: javascript with struts nested fields?


Why don't you use just formName["order.program"] ?


"David G Friedman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In an html page, is there a way to reference a nested form variable
without
> using array subscripts?
>
> In the web page the client sees, it gets the below:
>
> <input type="text" name="order.program" value="108">
>
> I want a pop-up calendar window button next to it that populates that
field
> with the selected date.  When I switched from "program" to a nested field
> named "order.program", it broke.  The "program" can be referenced by
> "formName.program" but the nested one causes javascript errors trying to
> reference it as "fornName.order.program".   I don't want to use
> fornName.elements[XXX] since any changes to the page layout might reorder
> fields and change those array subscripts, making development very messy.
> Any suggestions?  I tried formName."order.program" but it gave out
> Javascript errors.
>
> I've already checked some Javascript 1.1 developer and reference guides
from
> Netscape and didn't find anything suggesting how to do it this way.
>
> Thanks for any suggestions,
> David




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to