Posted By:
Brian_Tsang
Posted On:
Saturday, May 20, 2006 04:09 AM
I have a form with fields that are composed from a ResultSet of a database fetch, and composing names for some hidden fields associated with the data set. I want to use a javascript to update the status (hidden field value) according to changes from an input field. How do I reference such a dynamically generated hidden field name? The error message complains that the field I passed in is null or not an object. e.g. function updateStatus ( fieldtag, flag ) { //Get the form name in the current generated html page var rec_details_form = document.forms["MarcRecDetails"]; rec_details_form.fieldtag.value = flag; //Test the modified value alert ( "Status of "
More>>
I have a form with fields that are composed from a ResultSet of a database fetch, and composing names for some hidden fields associated with the data set. I want to use a javascript to update the status (hidden field value) according to changes from an input field. How do I reference such a dynamically generated hidden field name? The error message complains that the field I passed in is null or not an object.
e.g.
function updateStatus ( fieldtag, flag ) {
//Get the form name in the current generated html page
var rec_details_form = document.forms["MarcRecDetails"];
rec_details_form.fieldtag.value = flag;
//Test the modified value
alert ( "Status of " + fieldtag + " : " + rec_details_form.row.value );
}
One row of the form code:
-----------------------------------------
Not sure if all that makes sense. But I hope someone could shed some lights please.
Many thanks.
-Brian
<<Less