I do not know if this is even possible in this language, but here goes:
I am looping a recordset that has been returned for update. the problem is I have many records that can be returned, so when i submit my form, I get an error because it does not know what form elements to use. I used to use this method in coldfusion where I would apply a variable to the end of my form elelmets so they would all be uniquely named, thier form name + the incremt variable so it would give you textbox1 or textbox5.
Now here is the problem. I want to go from the many variables down to a single variable. my plan is to have a function in the on click method that sets the increment to the current row number. I then have a javascript funtion in my onsubmit method that takes this increment to set the single form element = to that value. doe this make sense? can it be done?
here is some sample code
jsIncrement = 0;
this is my on click function where ipass in the variable value and it works //fine
function setIncrement(num){
jsIncrement = num;
}
this is where I wish to set the standard form element = to the dynamic form elelemnt but do not know how...or if it can be done
function selectForUpdateSubmit() {
document.process_form.action.value = "SU";
document.process_form.prod_usage_id.value = [COLOR=DarkRed]document.process_form.upd_prod_usage_id+jsIncrement.value[/COLOR];
document.process_form.submit();
}
any help or suggestions are most appreciated.