If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > problems enabling buttons

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-30-03, 14:37
Bigced_21 Bigced_21 is offline
Registered User
 
Join Date: Dec 2002
Location: KY
Posts: 54
Red face problems enabling buttons

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>&nbsp;Mark Paid&nbsp;</td><td>&nbsp;State Number&nbsp;</td><td>&nbsp;Inspection Date&nbsp;</td><td>&nbsp;Inspection Status&nbsp;</td><td>&nbsp;Certificate Status&nbsp;</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>&nbsp;" & rs1("State_No") & "&nbsp;</td><td>&nbsp;" & rs1("Date_Inspection") & "&nbsp;</td>"

' Determine font color for non-Satisfactory Inspections
IF rs1("Inspect_Status") <> "Satisfactory" then
Response.Write "<td><font color='red'><b>&nbsp;" & rs1("Inspect_Status") & "&nbsp;</b></font></td>"
Else
Response.Write "<td>&nbsp;" & rs1("Inspect_Status") & "&nbsp;</td>"
End IF

Response.Write "<td>&nbsp;" & rs1("Record_Status") & "&nbsp;</td>"

Response.Write "</tr>"
i = i + 1
rs1.MoveNext()
Loop

Response.Write "<tr><td height='5'>&nbsp;</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!!!!!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On