To Webwork-users. We have a form with a number of data. We save changed whenever the user changes the data in a form-field (onChange event) We need to make some calculations based on other values on the same row. In order to handle this this want to append the row number on each field-name. Example: Item Actual count Min. count Wanted count Ordercount 1 5 5 10 5 5 10 5 10 0 9 6 5 10 0 15 12 5 10 0 Each formfield is named based on their column name eg: itemId currCount minValue wantedValue orderCount There exist getxxx for each column. There exist and iterator to traverse through the list of items.
Changing the field for item 9, min. count to 7 should change ordercount to 4. We need in the client javascript to be able to get each field and its value. Furthermore we would like the user to be able to press key-down/up and jump from field to field. (future option) So from my point of view we have two options. One is naming each formfield with the item-id. So the formfieldnames would be itemId1 currCount1 minValue1 wantedValue1 orderCount1 itemId5 currCount5 minValue5 wantedValue5 orderCount5 itemId9 currCount9 minValue9 wantedValue9 orderCount9 itemId15 currCount15 minValue15 wantedValue15 orderCount15 Calling the onChange script should then send the itemId as an parameter. How could we name the field based on the itemId ? And how should this look like for webwork ? The second option (and our prefered) - using a rowcounter eg: itemId1 currCount1 minValue1 wantedValue1 orderCount1 itemId2 currCount2 minValue2 wantedValue2 orderCount2 itemId3 currCount3 minValue3 wantedValue3 orderCount3 itemId4 currCount4 minValue4 wantedValue4 orderCount4 This will help us move up and down, and would be easier when we are not using a simple primary-key like itemId. How can we setup WebWork to handle a rowcounter in an iterator, and how can we append it to the name-field ?? And inputs would be really appreciated thank in advance - René Nygaard Net-Mill ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Webwork-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webwork-user