|
Hi there!
I am using javascript with asp. I have a form field and onclick, I call the javascript and pass 1) a table name 2) form field name 3) value.
I am able to receive the values correctly in the javascript function. Now I want to be able to set the value of the form field in the javascript function...Only thing is I am using the same function for abt 10 form fields...so I will have a loop, which works fine too. Problem is to get the fld name suplied to the function and be able to use it...code is as follows...
<script language="JavaScript1.2"><!--
function Func(tbl, fld, val)
{
//alert(tbl);
//alert(fld);
//alert(val);
document.Hiddenform.fld<%=x%>.value=val;
}
// --></script>
The fld in red is not getting the field name and instead just displays fld....i know its simple...something like +fld+ or soemthing....but i cant seem to get it...Any clues???
Thanks in Advance!!!
|