Hi
I have a form called 'store' with many fields, and I can update the 'name'
field ok like this
document.store.name.value = n; //this works fine
but I want a function to update any field, so would like to do something
like this:
function setStoreValue(f, v) {
eval ("document.store." + f + ".value") = v;
}
but when I do this, nothing happens - no errors, nothing.
Even this doesn't work:
function setStoreNameValue(n) {
eval("document.store.name.value = " + n);
}
This eval function has me beat. Is this the only way to set this up?
Can anyone tell me how I'm doing this wrong?
Many thanks.