penguinspeaks
Technical User
Hello everyone.
I am going to try and explain what I need, what the code is doing, and how I may injure myself due to the frustration.
I have a table of records returned from my query of the database table. This is fine and dandy. I am wanting to have some dropdown boxes on the table for the purpose of updating a person's status. I have placed a dropdown list for this purpose.
The problem is when this gets submitted, it sends the valuses for all records returned and not just the one I wish to update. I have the "ID" in a hidden field so the asp processing page knows which record should be updated but when I response.write id on that page, it shows every id returned fopr that query.
Here is the code
the result should be whatever the change is on the dropdown, along with the id for that record. this is what the response.write for the status_ and the id look like.
any ideas?
I am going to try and explain what I need, what the code is doing, and how I may injure myself due to the frustration.
I have a table of records returned from my query of the database table. This is fine and dandy. I am wanting to have some dropdown boxes on the table for the purpose of updating a person's status. I have placed a dropdown list for this purpose.
The problem is when this gets submitted, it sends the valuses for all records returned and not just the one I wish to update. I have the "ID" in a hidden field so the asp processing page knows which record should be updated but when I response.write id on that page, it shows every id returned fopr that query.
Here is the code
Code:
<form name="form1" action="statuschangeasp.asp" method="post">
<tr style bgcolor="<%=rowcolor%>">
<td class="auto-style2" ><%=orders1.fields.item("id").value%></td>
<td class="auto-style2" >
<span id="c10_ctl">
<select onChange="document.form1.submit()" name="change_">
<option selected="<%=orders1.fields.item("istatus_").value%>" value="<%=orders1.fields.item("istatus_").value%>"><%=orders1.fields.item("istatus_").value%></option>
<option value="Shipped">Shipped</option>
<option value="Sent">Sent</option>
<option value="paid1">Paid PayPal</option>
<option value="paid2">Paid Check</option>
<option value="received">Received</option>
<option value="processing">Processing</option>
<option value="processed">Processed</option>
<option value="returned">Returned</option>
<option value="Pending">Pending</option>
</select>
<input name="id" type="hidden" value='<%=orders1.fields.item("id").value%>'/>
</span>
</td>
<td class="auto-style2" ><%=orders1.fields.item("tracking_").value%></td>
<td class="auto-style2" ><%=orders1.fields.item("first_").value%></td>
<td class="auto-style2" ><%=orders1.fields.item("last_").value%></td>
<td class="auto-style2" ><%=orders1.fields.item("state_").value%></td>
<td class="auto-style2" ><%=orders1.fields.item("email_").value%></td>
<td class="auto-style2" ><%=orders1.fields.item("phone_").value%></td>
<td class="auto-style2" ><%=orders1.fields.item("mod1_").value%></td>
</tr>
<%
irowcolor = irowcolor + 1
orders1.movenext
loop
else
%>
</form>
the result should be whatever the change is on the dropdown, along with the id for that record. this is what the response.write for the status_ and the id look like.
Code:
processing, shipped, pending, shipped, pending, shipped, shipped, shipped, shipped, shipped, shipped, shipped, pending, pending, pending93, 100, 103, 105, 106, 108, 109, 115, 119, 120, 121, 123, 126, 127, 128
any ideas?