# Send to the Server, then Display response

**URL:** <https://forum.kirupa.com/t/send-to-the-server-then-display-response/25257>\
**Category:** flash\
**Created:** [July 10, 2003, 10:57pm UTC](https://forum.kirupa.com/t/send-to-the-server-then-display-response/25257 "2003-07-10T22:57:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tranism](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tranism/32/269_2.png) [@tranism](https://forum.kirupa.com/u/tranism)\
**Post date:** [July 10, 2003, 10:57pm UTC](https://forum.kirupa.com/t/send-to-the-server-then-display-response/25257/1 "2003-07-10T22:57:14Z")

</div>

so here’s my script to do this, will someone please please check it for me. It’s supposed to send to a php script on my server, then take the response and display it within a scroller box (using the flash mx scroller component). Did I do this write?

[AS]function submitForm()  
{  
formData = new LoadVars();  
formData.submit = “submit”;  
formData.dealer = “stores”;  
formData.txtZip = “”;  
formData.cboDist = cboDist.getValue();

```
    response = new LoadVars();
    response.onLoad = myOnLoad;
    
    formData.sendAndLoad("zipcodesearch.php", response, "post");

```

}

function getResponse(result)  
{  
if(result == true)  
{  
loadVarsText = new loadVars();  
loadVarsText.load(“textfield”);  
loadVarsText.onLoad = function(success) {  
if (success) {  
trace(“done loading”);  
scroller.html = true;  
scroller.htmlText = this.textfield;  
} else {  
trace(“not loaded”);  
}  
}  
}  
}[/AS]
