Not sure if this should go here or in the SQL forums, but I think the problem lies here. I have a series of checkboxes, that are stored in a SQL database and called when a page is loaded. There is an option to update the checkbox's on the page. However, the Update button only works every other time. The first time I click update, the page refreshes, but the checkbox's don't change (on the page or in the database). The second time, the page updates and the correct values are written into the SQL database. Greatly appreciate any insight anyone could offer here...
<tr>
<td width="25%" align="center">
<% if (Recordset1.Fields.Item("Checkbox7").Value == 1) { %> <input type="checkbox" name="Checkbox7" checked> <% }
else { %> <input type="checkbox" name="Checkbox7"> <% } %>
Checkbox7</td>
<td width="25%" align="center">
<% if (Recordset1.Fields.Item("Checkbox8").Value == 1) { %> <input type="checkbox" name="Checkbox8" checked> <% }
else { %> <input type="checkbox" name="Checkbox8"> <% } %>
Checkbox8</td>
</tr>
<tr><td colspan="2" align="center">
<input type="submit" value="Update">
<input type="hidden" name="MM_update" value="form3">
<input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("PackageID").Value %>">the value will not be a number but rather a boolean value, which means it shouldn't be compared to anything but an if statement. not really a solution but i have successfully pulled off what you are trying to do in multiple cases.
<tr>
<td width="25%" align="center">
<% if (Recordset1.Fields.Item("Checkbox7").Value == 1) { %> <input type="checkbox" name="Checkbox7" checked> <% }
else { %> <input type="checkbox" name="Checkbox7"> <% } %>
Checkbox7</td>
<td width="25%" align="center">
<% if (Recordset1.Fields.Item("Checkbox8").Value == 1) { %> <input type="checkbox" name="Checkbox8" checked> <% }
else { %> <input type="checkbox" name="Checkbox8"> <% } %>
Checkbox8</td>
</tr>
<tr><td colspan="2" align="center">
<input type="submit" value="Update">
<input type="hidden" name="MM_update" value="form3">
<input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("PackageID").Value %>">the value will not be a number but rather a boolean value, which means it shouldn't be compared to anything but an if statement. not really a solution but i have successfully pulled off what you are trying to do in multiple cases.