The "ON" value of the checkbox will come through in lowercase I think. Try 
something like this to make sure you're dealing with the same case in the 
comparison :-
 
<%If lCase(request.form("internet")) = "on" then 
response.write "<br>Internet" 
end if%> 

Alternatively you could check the length of the checkbox value like so :-
 
<%If len(request.form("internet"))> 0 then 
response.write "<br>Internet" 
end if%> 

Also, you're response.writing the checkbox value, not adding it to the email 
body variable. I'm guessing that's just for debug purposes?
 
Dan

________________________________

From: [email protected] on behalf of hcraig4
Sent: Mon 13/06/2005 14:20
To: [email protected]
Subject: [AspClassicAnyQuestionIsOk] CDONTS form with checkbox


Hi 
I'm trying to create a simple form where the information is emailed 
to someone. I'm new to this but I've got some of it working, I just 
can't get a check box or radio button to work 

here's the code, any help is greatly appreciated 

test_info.asp 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1"> 
<title>Untitled Document</title> 
</head> 

<body> 
<p>please fill out</p> 
<p>Name</p> 
<form name="form1" method="post" action="reply_info.asp"> 
<p>  </p> 
<p>Name</p> 
<p> 
<input name="name" type="text" id="name"> 
</p> 
<p> 
<input name="internet" type="checkbox" id="internet" value="ON"> 
internet </p> 
<p> </p> 
<p> 
<input type="submit" name="Submit" value="Submit"> 
</p> 
<p>  </p> 
</form> 
<p>  </p> 
</body> 
</html> 


reply page:
reply_info.asp

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1"> 
<title>Untitled Document</title> 
</head> 

<body> 
<p>thanks</p> 

<% set smail=Server.CreateObject("CDONTS.NewMail")%> 

<%HB=chr(13)%><%MailText="Name: "%> <%MailMessage=(MailMessage & 
MailText & Request("name") & HB)%> 





<%If request.form("internet")="ON" then 
response.write "<br>Internet" 
end if%> 



<% smail.From = "[EMAIL PROTECTED]" 
smail.To = "[EMAIL PROTECTED]" 
smail.Subject = "informationrequest" 
smail.Body = MailMessage 
smail.Send %> <% set smail = Nothing %> 


</body> 
</html> 

thanks





________________________________

Yahoo! Groups Links


*       To visit your group on the web, go to:
        http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
          
*       To unsubscribe from this group, send an email to:
        [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
          
*       Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service 
<http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to