If statement

W

wildt

I have a text field "status" populatd with Active or Inactive
and "Verify" a checkbox yes/No
I wanted to write something where "verify" is No and "status" = "Active"

Thanks
 
T

tom wilfred

I'm trying to write an if stastement
where if text field "status" = "Active"
and checkbox field "verify" (yes/No) = No then response.write
("something....")
i tried
ValueA = RS("status")
ValueB = RS("verify")

if valueB = No then valueB = "active
else
if valueA=valueB then
response.write ("something....")
end if

that didn't seem to work.
thanks
 
M

Mpaintnz

wildt said:
I have a text field "status" populatd with Active or Inactive
and "Verify" a checkbox yes/No
I wanted to write something where "verify" is No and "status" = "Active"
Thanks

It's more HTML than ASP, but inside your form tags try..

<p>Status?:<input type="text" name="status" size="20" value="Active"></p>
<p>Don't Verify?:<input type="checkbox" name="NoVerify" value="ON"
checked></p>

For ASP, you would probably use IF/THEN RESPONSE.WRITES() to tweak the
somestring of _value="somestring"_ to change the text boxes default value
to the string "active" (or "inactive").
And for the checkbox you would just add/remove the _checked_ string in the
tag, to say whether the checkbox is checked by default.

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top