Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie- How do I use request.form in asp

Status
Not open for further replies.

Ty1

Programmer
Dec 5, 2006
9
US
I am trying to check and see if a checkbox has been selected. The checkbox is an array, there are multiple checkbox' for each transaction line. The checkbox is out to the side and they select it if the transaction was a returned check. The following is my code:

dim nsfCheck(100)
dim nsfChecked
nsfCheck(i)=""
nsfCheck(i)=requestClick("nsfCheck" & i)

'Obtaining information from NSF checkbox
if nsfCheck(i)="1" then
nsfChecked = "Y"
strSQL = "INSERT INTO BadCheckReconciliation (FirstNoticeDate, NSFcheckFlag)" & vbcrlf
strSQL = strSQL & "VALUES SQLDate(FeeTransdt), nsfChecked" & vbcrlf
else
end if

dim strSQL2
'First select recordset for nsf check
if application("ODBC_Oracle") then
strSQL2 = "SELECT "
strSQL2 = strSQL2 & " J.JournalIdnt, J.BadCheckReconciliationIdnt"
strSQL2 = strSQL2 & " ,BCR.nsfCheckFlag"
strSQL2 = strSQL2 & " FROM Journal J, BadCheckReconciliation BCR"
strSQL2 = strSQL2 & " WHERE J.JournalIdnt = BCR.BadCheckReconciliationIdnt(+)"

else ' SQL 7.0

strSQL2 = "SELECT "
strSQL2 = strSQL2 & " J.JournalIdnt, J.BadCheckReconciliationIdnt" & vbcrlf
strSQL2 = strSQL2 & " ,BCR.nsfCheckFlag" & vbcrlf
strSQL2 = strSQL2 & " FROM Journal J, BadCheckReconciliation BCR" & vbcrlf
strSQL2 = strSQL2 & " WHERE J.JournalIdnt = BCR.BadCheckReconciliationIdnt(+)" & vbcrlf
end if

writecomment (strSQL2)
writeComment( strSQL )'This for a different select statement
set objRS = ODBC.Execute( strSQL, strSQL2 )

<td><%= buildCheckBox( "nsfCheck" & i , "", nsfCheck(i) ) %></td>
-----Nothing is happening when I run my code!!!-------------

Thanks for any assistance in the matter!!!!
 
For an easy example of a checkbox array, copy the following into a new file named zzz.asp
Code:
<form method="post" action="zzz.asp">
  <input type="checkbox" name="TestArray" value="1">
  ONE
  <br>
  <input type="checkbox" name="TestArray" value="2">
  TWO
  <br>
  <input type="checkbox" name="TestArray" value="3">
  THREE
  <br>
  Submitted: <%= Request("TestArray")%>
  <br>
  <input type="submit">
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top