K
Kevin
Hi,
I have a input with type checkbox. I want it to be automatically checked if
the value from the corresponding field in the database is also checked.
I tried this:
<%
set objdc = Server.CreateObject("ADODB.Connection")
etc ...
sql="select maa13 from mytable"
dim rsArray
Set rs = objdc.execute(sql)
if not rs.eof then
rsArray = rs.GetRows()
rec = UBound(rsArray, 2) + 1
rs.movefirst
....
%>
<html><body>
<input id="in100" name="maa13" type="checkbox"
value="<%=rs.Fields("maa13").Value%>>
.....
but nothing happens!
I can do this in Javascript like:
<script type="text/javascript">
if (<%=rs.Fields("maa13").Value%>="true")
{ document.getElementById("in100").checked=true}
.....
but it seems me possible to do it without scripting, or not?
Thanks
Kevin
I have a input with type checkbox. I want it to be automatically checked if
the value from the corresponding field in the database is also checked.
I tried this:
<%
set objdc = Server.CreateObject("ADODB.Connection")
etc ...
sql="select maa13 from mytable"
dim rsArray
Set rs = objdc.execute(sql)
if not rs.eof then
rsArray = rs.GetRows()
rec = UBound(rsArray, 2) + 1
rs.movefirst
....
%>
<html><body>
<input id="in100" name="maa13" type="checkbox"
value="<%=rs.Fields("maa13").Value%>>
.....
but nothing happens!
I can do this in Javascript like:
<script type="text/javascript">
if (<%=rs.Fields("maa13").Value%>="true")
{ document.getElementById("in100").checked=true}
.....
but it seems me possible to do it without scripting, or not?
Thanks
Kevin