<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script>
// ajax call for a server side script with State and County parameters
function ckCounty(st,cunty) {
$.ajax({
url: 'whateverScript.file?state='+st+'&county='+cunty,
success: function(rtn) {
if (rtn > 0)
{
return 'green';
}
}
});
}
var Color = 'grey'; Color = ckCounty('ga','TAYLOR');
console.log(Color);
</script>