You mean with ASP? Either
var VariableName = <%=VariableName%>;
document.forms['YourForm'].elements[VariableName].disabled=true;
Or
document.forms['YourForm'].elements[<%=VariableName%>].disabled=true;
In either case, somewhere on the page you have to define what's being held
in VariableName or the value will be blank. Ex:
<%
VariableName = Request.Form("FieldName")
%>
led said:
and in vbscript
Jon Spivey said:
Not like that, like this
document.forms['YourForm'].elements[VariableName].disabled=true;
Cheers,
Jon
led said:
window.document.fp1.variable.disabled=true
it is possible to write the name of a form control using a variable in a
expressio like that???
thanks