![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Hi, I have this variable checkstats=rs("Status") if checkstats has the value Yes then i want the checkbox to be selected IF it doesnt have any value or its blank then checkbox should not be selected I have my code like this Code: <%
checkstats=rs("Status")
Response.write "Status :-" & checkstats & "<br/>"
%>
<input type="checkbox" name="status" id="status" value="<%=checkstats%>" <%if Trim(checkstats)=Trim(Request.Form("status")) then Response.Write "checked" end if%> >
But it doesnt select the checkbox any idea todd |
| Sponsored Links |
|
#2
| ||||
| ||||
| Try this:- Code: <input type="checkbox" name="status" id="status" value="<%=checkstats%>" <%if Trim(checkstats)=Trim(Request.Form("status")) then Response.Write " checked" end if%> >
Otherwise you have <input type="checkbox" name="status" id="status" value="your_value"checked > which would not check the box. Hope that helps. |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| checkbox | todd2006 | ASP Development | 18 | June 19th, 2008 08:35 PM |
| checkbox validation | todd2006 | JavaScript Programming | 3 | June 18th, 2008 07:22 PM |
| display problem checkbox | todd2006 | JavaScript Programming | 4 | May 30th, 2008 03:58 PM |