Re: Using javascript to access nested form items

2005-03-15 Thread jelything
Just wanted to say that I got the syntax: window.opener.document.projectForm.elements["projectStobsForms[1].estStaffCost"].value Just in case somebody looks for this in the future. J - To unsubscribe, e-mail: [EMAIL PROTECT

Re: Using javascript to access nested form items

2005-03-14 Thread Frank W. Zammetti
That's what I thought, but I wasn't certain so I didn't say it. Both IE and Firefox handled it, at least to the extent that the fields of the inner form weren't lost or hidden or anything. I suppose that's a *form* of support :) -- Frank W. Zammetti Founder and Chief Software Architect Omnyte

Re: Using javascript to access nested form items

2005-03-14 Thread Hubert Rabago
or try something like: document.projectForm["projectStobsForms[1].estStaffCost"].value where "projectStobsForms[1].estStaffCost" matches what struts uses for the field names in the form controls. Hubert On Mon, 14 Mar 2005 17:45:33 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > At least

Re: Using javascript to access nested form items

2005-03-14 Thread Neil Erdwien
HTML doesn't support nested forms. In other words, is invalid HTML. The browsers likely just ignore the second FORM tag and treat it as one big form. But there no guarantees of that behavior. Frank W. Zammetti wrote: At least in IE: projectForm.estStaffCost.valu

Re: Using javascript to access nested form items

2005-03-14 Thread Frank W. Zammetti
At least in IE: projectForm.estStaffCost.value ...will get the value of the textfield. In fact, looking in the DOM inspector in Firefox, it is true there too. Seems "nested forms" is a bit of a misnomer... seems the elements of the second form show up in the object tree of the first. -- Frank

Using javascript to access nested form items

2005-03-14 Thread jelything
I have a struts 1.1 form with a nested form. I need to access textareas with javascript, but am not hitting the right syntax. Can anyone help me out? The main form is 'projectForm'. The nested form is 'projectStobsForms'. The textfield I'm trying to read/write is 'estStaffCost'. I've tried: