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: <html:text property="foo.bar" /> > > 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: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>