checked input box

Results 1 to 2 of 2

Thread: checked input box

  1. #1
    Join Date
    Dec 1969

    Default checked input box

    sorry if this is beginner question. i just need to check an input if its checked in the db. here&#039;s what i&#039;ve got<BR><BR>&#060;input type="checkbox" name="ITApproval" value="1"<BR><BR>&#060;% if ITApproval = -1 then <BR> response.write ("CHECKED") <BR> End If<BR> %&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: checked input box

    A checked box actually has *NO VALUE* at all in the next ASP page if it was unchecked. So, in some sense, you don&#039;t even care about the value (unless you are using it for other reasons, of course).<BR><BR>Also, you need to know that *ALL* Request("xxx") values are *always* strings! So don&#039;t compare them to numbers unless you convert them (e.g., using CDBL or CLNG) to numbers.<BR><BR>Anyway, the easy way to do this:<BR><BR>&#060;%<BR>If Request("ITApproval") &#060;&#062; "" Then<BR>&nbsp; &nbsp; Response.Write "APPROVED"<BR>End IF<BR>%&#062;<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts