# Passing info from checkbox to asp?

**URL:** <https://forum.kirupa.com/t/passing-info-from-checkbox-to-asp/62659>\
**Category:** flash\
**Created:** [August 30, 2004, 10:58am UTC](https://forum.kirupa.com/t/passing-info-from-checkbox-to-asp/62659 "2004-08-30T10:58:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimbly](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@jimbly](https://forum.kirupa.com/u/jimbly)\
**Post date:** [August 30, 2004, 10:58am UTC](https://forum.kirupa.com/t/passing-info-from-checkbox-to-asp/62659/1 "2004-08-30T10:58:03Z")

</div>

I wonder if someone could explain to me how on earth you set about giving a checkbox in a form a varibale.

I’m passing the form to a CDONTS ASP page, and I have three checkboxes, which I need to appear in the retuened email as either blank or ‘checked’.

(I have read the tuts here btw - but cannot get them to return a value)

My chk box is called ‘chk1’

So my AS on my submit button looks like this:  
on (release) {  
chk1 = chk1.getSelectedItem().label;  
getURL("[[color=#800080]http://www.holmes.7host.com/promise/mypage.asp[/color]](http://www.holmes.7host.com/promise/mypage.asp)", “”, “POST”);

}

My corresponding ASP page looks like this:

\<% @language=“VBSCRIPT” %\>  
\<%

Dim myMail, myBody

myBody = "Name: "& request.form(“name”) & vbcrlf  
myBody = myBody & "Email: "& request.form(“email”) & vbcrlf  
myBody = myBody & "Position: "& request.form(“position”) & vbcrlf  
myBody = myBody & "Company: "& request.form(“company”) & vbcrlf  
myBody = myBody & "Address: "& request.form(“address”) & vbcrlf  
myBody = myBody & "Postcode: "& request.form(“postcode”) & vbcrlf  
myBody = myBody & "Telephone: "& request.form(“telephone”) & vbcrlf  
myBody = myBody & "Open Courses: "& request.form(“chk1”) & vbcrlf  
myBody = myBody & "In house Courses: "& request.form(“chk2”) & vbcrlf  
myBody = myBody & "Organisational Development: "& request.form(“chk3”) & vbcrlf  
myBody = myBody & "Message: "& vbcrlf & request.form(“message”)

Set myMail = CreateObject(“CDONTS.NewMail”)

myMail.BodyFormat=1  
myMail.MailFormat=1  
myMail.From=request.form(“email”)  
[myMail.To="holmes@dircon.co.uk](mailto:myMail.To=%22holmes@dircon.co.uk)"  
myMail.Subject=“Response from Promise Website”  
myMail.Body=myBody  
myMail.Send

set myMail=nothing

%\>

Help!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 1, 2004, 8:27am UTC](https://forum.kirupa.com/t/passing-info-from-checkbox-to-asp/62659/2 "2004-09-01T08:27:06Z")

</div>

So nobody knows then?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 2, 2004, 4:22am UTC](https://forum.kirupa.com/t/passing-info-from-checkbox-to-asp/62659/3 "2004-09-02T04:22:21Z")

</div>

> 

So my AS on my submit button looks like this:  
on (release) {  
chk1 = chk1.getSelectedItem().label;  
getURL(“[http://www.holmes.7host.com/promise/mypage.asp](http://www.holmes.7host.com/promise/mypage.asp)”, “”, “POST”);

}

Check if you passed the chk1 variable. In your code hre the seconds parameter of getURL is blank.  
should be something like geturl(…, “chk1=” + chk1, …);
