0

Hello, i'm a asp beginner and in industrial training.. i got problem in my project to update the checkbox. i had tried many example but doesn't work. Here are some code . please assist me guys.. Thanks lot for your kindness...

<%intChecboxValue = Request.Form("normal_req")
If intChecboxValue = "" Then intChecboxValue = 0%>
<%
normal_req = replace(request(trim("normal_req")),"'","''")
set rs     = server.createobject("ADODB.Recordset")			
SQL        = "SELECT * FROM tbAppIncident where emp_no = '"&emp_no&"'"
rs.open SQL,con%>  
      <td width="4%"><input name="normal_req" id="normal_req" type="checkbox" value="1"<% If rs("normal_req").Value = True Then Response.Write("checked") %>></td>

The problem is, the checkbox doesn't ticked as it was save previous when i want to edit it.

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Baradaran
0

Hi
This might be because you have no space between the " and the checked in line 8.

<td width="4%"><input name="normal_req" id="normal_req" type="checkbox" value="1"<% If rs("normal_req").Value = True Then Response.Write(" checked") %>></td>

And better is to use checked="checked".

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.