function processZipCodeSelection(req) { var cityAndState = req.responseText.split(','); setCityAndStateFields(cityAndState[0], cityAndState[1]); Fat.fade_element("form:city"); Fat.fade_element("form:state"); }It places the city and state in their proper fields and provides a visual cue that the fields have changed by slowly fading the background color.
This is accomplished with the Fade Anything Technique library:
<script type="text/javascript" src="fat.js"></script>