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];

any help or suggestions are most appreciated.

Edited by happygeek: fixed formatting

12 Years
Discussion Span
Last Post by beckerc

After posting this. it occured to me that rather than passing the increment to try and translate a dynamic form element, i could simply pass the primary key for the row needed and then set the single element equal to that value :o

missing the forest for the trees sometimes.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.