var aoModifications = { handleSuccess:function(o) { this.processResult(o); }, handleFailure:function(o) { emptySelect( document.getElementById( 'modifications' ) ); }, processResult:function(o) { response = o.responseText.parseJSON(); createSelect( document.getElementById( 'modifications' ), response[0], response[1] ); }, startRequest:function( params, selected ) { loading = new Array( 'Loading...' ); createSelect( document.getElementById( 'modifications' ), loading, '' ); YAHOO.util.Connect.asyncRequest('POST', '/ajax/ajax.php', aoModificationsCallback, "action=getModifications¶ms=" + params.toJSONString() + '&selected=' + selected ); } }; var aoModificationsCallback = { success:aoModifications.handleSuccess, failure:aoModifications.handleFailure, scope: aoModifications };