# Flash checkbox to Asp?

**URL:** <https://forum.kirupa.com/t/flash-checkbox-to-asp/62880>\
**Category:** Uncategorized\
**Created:** [September 1, 2004, 8:30am UTC](https://forum.kirupa.com/t/flash-checkbox-to-asp/62880 "2004-09-01T08:30:36Z")\
**Posts on this page:** 2\
**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:** [September 1, 2004, 8:30am UTC](https://forum.kirupa.com/t/flash-checkbox-to-asp/62880/1 "2004-09-01T08:30:36Z")

</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, 2:47pm UTC](https://forum.kirupa.com/t/flash-checkbox-to-asp/62880/2 "2004-09-01T14:47:54Z")

</div>

to push the variables out of flash you’ll need to do something like this :

(from ultrashock)

```auto

// create event listener object for checkbox
myCheckboxListener = new Object();

// click event handler
myCheckboxListener.click = function ( eventObject )
{
	if ( myCheckbox.selected )
	{
		myLabel.text = "You have checked the checkbox!";						
	}
	else
	{
		myLabel.text = "You have unchecked the checkbox!";			
	}
}

// register the event listener
myCheckbox.addEventListener("click", myCheckboxListener);

```

Also your going to want to use LoadVars() instead of getURL(). Run a few searches on that and you should be good to go 🙂
