I am new to ajax.. and my javascript isn't too hot either:)
I am trying a simple lookup of a city and state given a zip code. I
have it working if I just return a city as a string, but when I try
to return a structure with a city and state I get "undefined"
Here is the code where I call the ajax function...
<cfajaxproxy cfc="ajaxtest" jsclassname="ajaxproxy" />
<script>
var myProxy = new ajaxproxy();
function getcity() {
var zipcode= document.getElementById('zip').value;
var result = myProxy.ziptocitystate(zipcode);
document.getElementById('city').value=result.city;
document.getElementById('state').value=result.state;
}
</script>
What notation is used to access the structure?
thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315557
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4