Ok I figured out how to disable a radio button, but changing the same function to enable an already disabled radio button does not work. When I try to enable a disabled combo box it says object required saying that my combo box does not exist when it does. Any help in letting me understand would be grateful.
<form name=form1 method=post action=test.asp>
<head>
<script language="javascript">
function enabling(){
document.form1.sort[0].enabled = true;
return false;
}
</script>
</head>
<p><font size=5>Aging Work Order Form</font><br><br>
<p>Search By</p>
<input type=radio name=shop value="ftr_description" checked>Entire Shop
<input type=radio name=shop value="sh_name" onclick="enabling();">One Trade<br>
<P>Sort By</P>
<input type=radio name=sort value="wo_request_date" checked disabled>Date
<input type=radio name=sort value="wo_number">Work Order #<br>
<%
set conn=server.CreateObject("adodb.connection"
set objrs=server.CreateObject("adodb.recordset"
conn.Open("DRIVER={Microsoft ODBC for Oracle};SERVER=
objRS.Open "select sh_name from f_shops", conn
if Request("cboPrimary"
= "" then
shop= objRS("sh_name"
else
shop = Request("cboPrimary"
end if
%>
<p>
<select name=cboPrimary size=1 onChange="form1.submit();">
<%
while not objRS.EOF
varShop = objRS("sh_name"
%>
<option value="<%=varShop%>" <%if shop = varShop then Response.Write " SELECTED"%>><%=objRS("sh_name"
%>
<% objRS.MoveNext
wend
objRS.Close
objRS.Open "select ftr_description from f_trades, f_shops where ftr_sh_fk = sh_pk and sh_name = '" & shop &"'", conn
%>
</select>
</p>
<p>
<select name=cboSecondary size=1 disabled>
<%
while not objRS.EOF
varShop = objRS("ftr_description"
%>
<option value="<%=varShop%>"><%=objrs("ftr_description"
%>
<%
objRS.MoveNext
wend
objRS.Close
set objRS.ActiveConnection = nothing
set objRS = nothing
%>
</select>
</form>
<form name=form1 method=post action=test.asp>
<head>
<script language="javascript">
function enabling(){
document.form1.sort[0].enabled = true;
return false;
}
</script>
</head>
<p><font size=5>Aging Work Order Form</font><br><br>
<p>Search By</p>
<input type=radio name=shop value="ftr_description" checked>Entire Shop
<input type=radio name=shop value="sh_name" onclick="enabling();">One Trade<br>
<P>Sort By</P>
<input type=radio name=sort value="wo_request_date" checked disabled>Date
<input type=radio name=sort value="wo_number">Work Order #<br>
<%
set conn=server.CreateObject("adodb.connection"
set objrs=server.CreateObject("adodb.recordset"
conn.Open("DRIVER={Microsoft ODBC for Oracle};SERVER=
objRS.Open "select sh_name from f_shops", conn
if Request("cboPrimary"
shop= objRS("sh_name"
else
shop = Request("cboPrimary"
end if
%>
<p>
<select name=cboPrimary size=1 onChange="form1.submit();">
<%
while not objRS.EOF
varShop = objRS("sh_name"
<option value="<%=varShop%>" <%if shop = varShop then Response.Write " SELECTED"%>><%=objRS("sh_name"
<% objRS.MoveNext
wend
objRS.Close
objRS.Open "select ftr_description from f_trades, f_shops where ftr_sh_fk = sh_pk and sh_name = '" & shop &"'", conn
%>
</select>
</p>
<p>
<select name=cboSecondary size=1 disabled>
<%
while not objRS.EOF
varShop = objRS("ftr_description"
<option value="<%=varShop%>"><%=objrs("ftr_description"
<%
objRS.MoveNext
wend
objRS.Close
set objRS.ActiveConnection = nothing
set objRS = nothing
%>
</select>
</form>