# sendAndLoad using ColdFusion

**URL:** <https://forum.kirupa.com/t/sendandload-using-coldfusion/250098>\
**Category:** flash\
**Created:** [January 25, 2008, 3:41pm UTC](https://forum.kirupa.com/t/sendandload-using-coldfusion/250098 "2008-01-25T15:41:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bardic](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bardic/32/3708_2.png) [@bardic](https://forum.kirupa.com/u/bardic)\
**Post date:** [January 25, 2008, 3:41pm UTC](https://forum.kirupa.com/t/sendandload-using-coldfusion/250098/1 "2008-01-25T15:41:06Z")

</div>

Sending works like a charm. But I can’t for the life of me get it to return anything from the coldfusion script.

AS:

```auto

on(release){
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
        if (success) {
            gotoAndPlay(result_lv.vr);
        } else {
            gotoAndPlay("error");
        }
    }
    
    var contest_var:LoadVars = new LoadVars();
    contest_var.entryName = _parent.txtName.text;
    contest_var.entryPhone = _parent.txtPhone.text;
    contest_var.entryEmail = _parent.txtEmail.text;
    contest_var.entryProv = _parent.txtProv.text;
    contest_var.lang = 1;
    if(_global.receive == true){
        contest_var.entryReceive = "yes";
    }
    
    if(_global.agree == true){
        contest_var.entryAgree = "yes";
    }
    
    trace(_parent.txtName.text);
    contest_var.sendAndLoad("http://ascentahealth.com/submitContest.cfm",result_lv,"GET");
}

```

CF

```auto

<cfif isDefined("form.entryName") and isDefined("form.entryEmail") and isDefined("form.entryAgree") and isDefined("form.entryPhone")>
    <cfquery name="checkEntry" datasource="#dsn#">
        select * from competition where email = '#form.entryEmail#'
    </cfquery>
    <cfif checkEntry.recordcount neq 0>
        <!-- -->
    <cfelse> 
        <cfquery name="addPerson" datasource="#dsn#">
            insert into competition(name,phone,province,email) values ('#form.entryName#','#form.entryPhone#','#form.entryProv#','#form.entryEmail#')
        </cfquery>    
        **<cfoutput>&vr=entered</cfoutput>**
        <cfif isDefined("form.entryAgree")>
            <cfquery name="checkMail" datasource="#dsn#">
                select * from mailto where email = '#form.entryEmail#'
            </cfquery>
            <cfif checkMail.recordcount neq 0>
                <!-- -->
            <cfelse>
                <cfif #form.lang# eq 1>
                    <cfset lang = "english">
                <cfelse>
                    <cfset lang = "french">
                </cfif>
                <cfquery name="addPerson" datasource="#dsn#">
                    insert into mailto(email,name,language) values ('#form.entryEmail#','#form.entryName#','#lang#')
                </cfquery>
                <cfset success=1>
            </cfif>
        </cfif>   
      </cfif>
<cfelse>
    <!-- -->
</cfif>

```

The script submit fine. It’s just when I try to get it to return something to flash that I’m having the troubles.  
I’ve bolded in the CF what I’m trying currently.

Help as always, is appreciated ^^
