function SetFormValue(column,values)
{
var elem;
for(var m=0;m{
var tempValue=column[m];
elem=null;
elem=document.getElementById (tempValue);
if(elem==null)
{
//If there is no corresponding control, skip this loop
continue;
}
var trueValue=eval("values.Rows[0]." tempValue);
if(trueValue==''||trueValue=='null'||trueValue==null)
{
//If the current value is empty, skip this loop
continue;
}
if(elem.tagName=='SELECT')
{
//select control Also handle
for(var j=0;j {
if(trueValue==elem.options[j].value)
{
//Find the corresponding element and make it selected
elem.options[j].selected=true;
//Make it unselectable
elem.disabled=true;
//Exit Loop
break;
}
}
}
else if(elem.tagName=='INPUT')
{
elem.value=trueValue;
elem .readOnly=true;
}
}
}