Summarize getField/setVal
-
Hello
Thanks for your great plugin.
How can I summarize this code?
(function(){
if(fieldname505==1 )
{
return (function() {var result = 1; getField(fieldname524|n).setVal(result); return result;})(); }
if(fieldname505==2 )
{
return (function() {var result = 2; getField(fieldname524|n).setVal(result); return result;})(); }
if(fieldname505==3 )
{
return (function() {var result = 3; getField(fieldname524|n).setVal(result); return result;})(); }
....
....
....
if(fieldname505==20 )
{
return (function() {var result = 20; getField(fieldname524|n).setVal(result); return result;})(); }
})()
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.