473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Issue updating checkboxes from a search page

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=<%=rstPalm("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.

Help?
~Lisa~
Jul 19 '05 #1
1 1186
"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
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Pete | last post by:
There is a Summary/Example further down... On page one of my site I have a form with some checkboxes and detailed descriptions. When the form is submitted (to page two), the values of the...
5
by: LRW | last post by:
I did a Web search, and a deja.com search on this...and I'm finding how to make checkboxes act like radiobuttons, and other interesting behaviors, but nothing that quite answers my question. If...
8
by: DylanM | last post by:
I have some checkboxes that are generated from the results of a database search. At the moment, the checkboxes are part of a table making up a form. Users are going through the form, clicking the...
0
by: Kent | last post by:
THe page in question can be viewed here: http://sourcepost.sytes.net/sourceview.aspx?source_id=17723 it is otherwise known as "documentupload.aspx" and can only be accessed if you have an account...
0
by: dan_williams | last post by:
I have an ASP.NET web page with a CheckBoxList which users can select multiple checkboxes and select to save, which inserts a record/row for each checkbox ticked into an SQL database. What is...
7
by: rn5a | last post by:
The first column of a DataGrid has a CheckBox for all the rows. I want that when users check a CheckBox, the BackColor of that entire row in the DataGrid should change to a different color. To...
10
by: chimambo | last post by:
Hi All, I have a little problem. I am retrieving records from a table and I want to update the records using checkboxes. I am able to display the database record quite alright and I have created...
0
by: TechnoAtif | last post by:
<?php include "dbconnect.php"; include "commonFunc.php"; ?> <!----------------------------------> <table width="80%" border="1" cellpadding="2" cellspacing="0"> <tr > <td...
2
by: bdmakana | last post by:
Hello, I have searching all day everyday for the past 4 days (appx 40 hours) and I have not been able to find a solution or even a path to figuring out how to do what I'm looking to accomplish: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.