DOM instruction with vars -
11-08-2005
, 01:04 PM
What i like to do is making a function where i can use vars in a DOM instuction.
example:
function myfunction(myvar)
{var myfieldvalue=document.frmrecord.+ myvar+ .value; //this will not work
//and more intructions
}
In the DOM instruction i like to replace myfield with myvar to make this function usable for more then one field
(The normal DOM instruction is var myfieldvalue=document.frmrecord.myfield.value to get the value of myfield)
Anyone a solution to my problem? |