chetFinster
Programmer
See below - "B" works, while "A' doesn't.
I want to allow the user to change some values in the FORM by passing params in a function. The value of 'thisFormName' is retrieved dynamically so the script is re-useable (test for FORM type).
Simply trying to use the variable (thisFormName) to allow execution of a command based on a retreived value to change a value in a FORM, but the 'A' version doesn't execute.
A. eval("document." + thisFormName + ".elements[0].style.width=" + newWidth);
B. document.form2.elements[0].style.width= newWidth;
Your help is appreciated after MUCH digging and hair pulling.
I want to allow the user to change some values in the FORM by passing params in a function. The value of 'thisFormName' is retrieved dynamically so the script is re-useable (test for FORM type).
Simply trying to use the variable (thisFormName) to allow execution of a command based on a retreived value to change a value in a FORM, but the 'A' version doesn't execute.
A. eval("document." + thisFormName + ".elements[0].style.width=" + newWidth);
B. document.form2.elements[0].style.width= newWidth;
Your help is appreciated after MUCH digging and hair pulling.