"Lisa" <pe*****@yahoo.com> wrote in message
news:89*************************@posting.google.co m...
: I have a search page that displays all data from a table
: <%For intIndex = 1 To rstPalm.RecordCount%>
: <tr>
: <td><font size="2" face="arial"><%=rstPalm("load_id")%></font></td>
: <td><font size="2" face="arial"><%=rstPalm("ProjectName")%></font></td>
: <input type="hidden" name="txtLoadID" value="<%=rstPalm("load_id")%>">
: <td><font size="2" face="arial">Palm Load</font></td>
: <td align="center"><INPUT type="checkbox" id="checkbox"
: name="chkPackage" value="Yes" <%IF Trim(rstPalm("Package"))="Yes" Then
: %> Checked <% End If %>></td>
: <td align="center"><INPUT type="checkbox" id="checkbox"
: name="chkAppVal" value="Yes" <%IF Trim(rstPalm("AppValidation"))="Yes"
: Then %> Checked <% End If %>></td>
: <td><INPUT type="button" value="Update" name="Update"
:
onclick="location.href='../Validation/Process_main_search.asp?LoadID=<%=rstP
alm("load_id")%>&Project=<%=rstPalm("ProjectName") %>'"
: WIDTH="50" HEIGHT="25"></td>
: </tr>
:
: Which works fine - but when I click the Update button, it will not
: update the checkbox field (I did a response.write
: ("Response.Form("chkPackage") and it was blank).I've tried posting the
: page in the form tag - and the checkbox would update (response.write
: query did equal "yes"), but then I loose the load_id for that record
: because I am no longer in the For loop.
Hi Lisa...
Response.Form is invalid. Do you mean you tried:
Response.Write(Request.Form("chkPackage"))
You haven't shown us everything because your FOR...NEXT does not have a
NEXT.
I'm not sure if this line has a problem with "" and ''
<INPUT type="button" value="Update" name="Update"
onclick="location.href='../Validation/Process_main_search.asp?LoadID=<%=rstP
alm("load_id")%>&Project=<%=rstPalm("ProjectName") %>'" WIDTH="50"
HEIGHT="25">
Would this work any different? (watch for wrap)
<%
Sub Prt(str)
Response.Write(str & vbCrLf)
End Sub
Sub PrtSame(str)
Response.Write(str)
End Sub
For intIndex = 1 To rstPalm.RecordCount
Prt("<tr>")
Prt("<td><font size=""2"" face=""arial"">" & rstPalm("load_id") &
"</font></td>")
Prt("<td><font size=""2"" face=""arial"">" & rstPalm("ProjectName") &
"</font></td>")
Prt("<input type=""hidden"" name=""txtLoadID"" value=""" &
rstPalm("load_id") & """ />")
Prt("<td><font size=""2"" face=""arial"">Palm Load</font></td>")
PrtSame("<td align=""center""><INPUT type=""checkbox"" id=""checkbox""
name=""chkPackage"" value=""Yes""")
If Trim(rstPalm("Package")) = "Yes" Then
PrtSame(" Checked")
End If
Prt(" /></td>")
PrtSame("<td align=""center""><INPUT type=""checkbox"" id=""checkbox""
name=""chkAppVal"" value=""Yes""")
if Trim(rstPalm("AppValidation"))="Yes" Then
PrtSame(" Checked")
End If
Prt(" /></td>")
Prt("<td><INPUT type=""button"" value=""Update"" name=""Update""
onclick=""location.href='../Validation/Process_main_search.asp?LoadID=" &
rstPalm("load_id") & "&Project=" & rstPalm("ProjectName") & "'" WIDTH=""50""
HEIGHT=""25"" /></td>")
Prt("</tr>")
Next
%>
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp