I'm trying to enable 2 submit buttons to perform certain task which is self explanatory in the code: top - display available certificates
bottom - process paid inspections.
The problem I'm having is when I check the boxes for the paid inspections i can't click the process paid button because its disabled
here's the code:
<!-- #include file='sqlconnect.asp' -->
<!-- #include file='menu_report.asp' -->
<%
OpenConnection()
strSQL = "Execute sp_Get_ReportPending"
Set rs1 = objConn.Execute(strSQL)
%>
<html>
<LINK REL="stylesheet" HREF="../adminStyle.css" TYPE="text/css" />
<title>Boiler Inspection</title>
<body marginheight='0' marginwidth='0' topmargin='0' leftmargin='0'>
<div align='center'>
<table cellpadding='0' cellspacing='0' border='0'>
<tr><td align='center'>
<form action='blr_report_certificate_print.asp' method='post'>
<%
button_disabled = "disabled"
Do While NOT rs1.EOF
IF rs1("Record_Status_ID") = 1 and rs1("Inspect_Status") = "Satisfactory" Then
IF currentID <> rs1("State_No") Then
strPrint = strPrint & "<input type='hidden' name='search_no' value='" & rs1("State_No") & "'>"
End IF
End IF
currentID = rs1("State_No")
rs1.MoveNext()
Loop
If strPrint <> "" Then
Response.Write strPrint
button_disabled = ""
End IF
Response.Write "<input type='submit' class='button' value='Display Available Certificates' " & button_disabled & ">"
%>
</form>
</td></tr>
</table>
</p>
<form action='blr_report_certificate_process.asp' method='post'>
<input type='hidden' name='action' value='paid'>
<table cellpadding='0' cellspacing='0' border='0'>
<tr bgcolor='white'><td> Mark Paid </td><td> State Number </td><td> Inspection Date </td><td> Inspection Status </td><td> Certificate Status </td></tr>
<%
i = 0
rs1.MoveFirst()
Do While NOT rs1.EOF
If i Mod 2 = 0 then
Response.Write "<tr bgcolor='#D2DCF2'>"
Else
Response.Write "<tr bgcolor='white'>"
End If
button_disabled = "disabled"
If rs1("Record_Status_ID") <> 1 and rs1("Inspect_Status") = "Satisfactory" Then
Response.Write "<td align='center'><input type='checkbox' name='paid' value='" & rs1("ID") & "'></td>"
button_disabled = ""
Else
Response.Write "<td align='center'> - </td>"
End IF
Response.Write "<td> " & rs1("State_No") & " </td><td> " & rs1("Date_Inspection") & " </td>"
' Determine font color for non-Satisfactory Inspections
IF rs1("Inspect_Status") <> "Satisfactory" then
Response.Write "<td><font color='red'><b> " & rs1("Inspect_Status") & " </b></font></td>"
Else
Response.Write "<td> " & rs1("Inspect_Status") & " </td>"
End IF
Response.Write "<td> " & rs1("Record_Status") & " </td>"
Response.Write "</tr>"
i = i + 1
rs1.MoveNext()
Loop
Response.Write "<tr><td height='5'> </td></tr>"
'process button
Response.Write "<tr><td colspan='5' align='center'><br><input type='submit' class='button' value='Process Paid Inspections' " & button_disabled & "></td></tr>"
%>
</form>
</table>
</div>
</body>
</html>
<%
CloseConnection()
%>
Please Help!!!!!