jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes Select dinamically with radio buttons + indexed Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Select dinamically with radio buttons + indexed Form" Watch "Select dinamically with radio buttons + indexed Form" New topic

Select dinamically with radio buttons + indexed Form

Manuel Sanchez Iba�ez

Joined: Jul 12, 2005
Posts: 20
Hello all, you are the last hope. Sorry for my english, i speak english a litle. I have a form with a unknown number of fields and something fields have multiple possibility.

I use Struts and i have resolved the problem of unknown fields using "indexed" property. One example:

The number of fields depends of information loading in DB. Well, one example is this form with 2 records loaded. The fields are initialized with the stored values and the user can modify that values. I put directly the html code generated:

If two records were stored with radio-button value="CONINDATA", each radio-button (value="CONINDATA") of record will appear selected. That�s all right. We suppose two records have selected a radio button with value="conindata".

The problem is when user want to change to other radio button. If he clicks in other radio button (value="GESINDATA") of record1, works fine but if he clicks too in radio button with value="GESINDATA" of record2 throws an error:

"the object don�t accept this property or method"

The JavaScript function change the list of values in select field depending of radio button is clicked (The lists of values are loading in variables)

I think the problem is in bold line because the change of values in select field work fine while the user doesn�t click the same two radio buttons.

If you need more information about my problem, tell me and i will write soon.

I agree. Here's the link: http://aspose.com/file-tools
subject: Select dinamically with radio buttons + indexed Form
It's not a secret anymore!