RE: nested references and javascript

2002-10-11 Thread Arron Bates

or even...

document.forms["myForm"]["foo.bar"].value

The ".elements" bit is optional.


Arron.


On Fri, 2002-10-11 at 15:23, Steve Widmar wrote:
> D'oh!
> 
> (as in 'Doh yeah')
> 
> no wonder it wasn't in the archives; well, it is now (or should be soon).
> 
> Thanks, James.
> 
> >>> [EMAIL PROTECTED] 10/10/02 09:27PM >>>
> You can use an alternate sytax.
> 
> Example:
> Number(document.forms["myForm"].elements["foo.bar"].value);
>   or
> Number(document.forms[0].elements["foo.bar"].value);
> 
> 
> 
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org 
> 
> > -Original Message-
> > From: Steve Widmar [mailto:[EMAIL PROTECTED]] 
> > Sent: Friday, October 11, 2002 12:22 AM
> > To: [EMAIL PROTECTED] 
> > Subject: nested references and javascript
> > 
> > 
> > I've got a question about this subject that's probably obvious to 
> > experienced users.
> > 
> > I've searched the mail archives on the subject and haven't found 
> > any joy, so here's my puzzler:
> > 
> > I'm starting to use nested references in 1.0.2...
> > for example: 
> > 
> > The framework is working fine, as I've got a getFoo() on the 
> > named bean with a getBar() and it shows in the html form in the browser.
> > 
> > When i try to update existing javascript to match the new 
> > nest-compliant name, it dont work :-(
> > for example:  Number(document.forms[0].foo.bar.value);
> > generates the following error message:  document.forms[0].foo has 
> > no properties.
> > 
> > So the $.64 question:  ->  am i doing it wrong, or is it undoable?
> > 
> > I guess it's more of a 'javascript-users' issue, but i figgered 
> > someone here has hit this already
> > 
> > (Why 1.0.2? The app's been in production for a while on 1.0.2... 
> > (BTW, thanks struts-dev)).
> > 
> > Thanks, 
> > Steve
> > 
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > 
> > For additional commands, e-mail: 
> > 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: nested references and javascript

2002-10-10 Thread Steve Widmar

D'oh!

(as in 'Doh yeah')

no wonder it wasn't in the archives; well, it is now (or should be soon).

Thanks, James.

>>> [EMAIL PROTECTED] 10/10/02 09:27PM >>>
You can use an alternate sytax.

Example:
Number(document.forms["myForm"].elements["foo.bar"].value);
  or
Number(document.forms[0].elements["foo.bar"].value);



James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org 

> -Original Message-
> From: Steve Widmar [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, October 11, 2002 12:22 AM
> To: [EMAIL PROTECTED] 
> Subject: nested references and javascript
> 
> 
> I've got a question about this subject that's probably obvious to 
> experienced users.
> 
> I've searched the mail archives on the subject and haven't found 
> any joy, so here's my puzzler:
> 
> I'm starting to use nested references in 1.0.2...
> for example: 
> 
> The framework is working fine, as I've got a getFoo() on the 
> named bean with a getBar() and it shows in the html form in the browser.
> 
> When i try to update existing javascript to match the new 
> nest-compliant name, it dont work :-(
> for example:  Number(document.forms[0].foo.bar.value);
> generates the following error message:  document.forms[0].foo has 
> no properties.
> 
> So the $.64 question:  ->  am i doing it wrong, or is it undoable?
> 
> I guess it's more of a 'javascript-users' issue, but i figgered 
> someone here has hit this already
> 
> (Why 1.0.2? The app's been in production for a while on 1.0.2... 
> (BTW, thanks struts-dev)).
> 
> Thanks, 
> Steve
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: nested references and javascript

2002-10-10 Thread James Mitchell

You can use an alternate sytax.

Example:
Number(document.forms["myForm"].elements["foo.bar"].value);
  or
Number(document.forms[0].elements["foo.bar"].value);



James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

> -Original Message-
> From: Steve Widmar [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 12:22 AM
> To: [EMAIL PROTECTED]
> Subject: nested references and javascript
> 
> 
> I've got a question about this subject that's probably obvious to 
> experienced users.
> 
> I've searched the mail archives on the subject and haven't found 
> any joy, so here's my puzzler:
> 
> I'm starting to use nested references in 1.0.2...
> for example: 
> 
> The framework is working fine, as I've got a getFoo() on the 
> named bean with a getBar() and it shows in the html form in the browser.
> 
> When i try to update existing javascript to match the new 
> nest-compliant name, it dont work :-(
> for example:  Number(document.forms[0].foo.bar.value);
> generates the following error message:  document.forms[0].foo has 
> no properties.
> 
> So the $.64 question:  ->  am i doing it wrong, or is it undoable?
> 
> I guess it's more of a 'javascript-users' issue, but i figgered 
> someone here has hit this already
> 
> (Why 1.0.2? The app's been in production for a while on 1.0.2... 
> (BTW, thanks struts-dev)).
> 
> Thanks, 
> Steve
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: