public/javascripts/inputex/js/fields/StringAvailability.js
function(string) {
		// TODO split params ? &
		YAHOO.util.Connect.asyncRequest('GET', this.options.uri+'?availabilityRequest='+string, {
			success: function(o) {
				var obj = lang.JSON.parse(o.responseText);
				if(obj === "true" || !!obj){
					this.onAvailable();
				}
				else if(obj === "false" || !obj){
					this.onUnavailable();
				}
				else{
					this.failure(o);
				}
			},
			failure: function(o) {
				// TODO ?
			},
			scope: this
		});
	}
function(string) {
		// TODO split params ? &
		YAHOO.util.Connect.asyncRequest('GET', this.options.uri+'?availabilityRequest='+string, {
			success: function(o) {
				var obj = lang.JSON.parse(o.responseText);
				if(obj === "true" || !!obj){
					this.onAvailable();
				}
				else if(obj === "false" || !obj){
					this.onUnavailable();
				}
				else{
					this.failure(o);
				}
			},
			failure: function(o) {
				// TODO ?
			},
			scope: this
		});
	}
function ( string ) { // TODO split params ? & YAHOO . util . Connect . asyncRequest ( 'GET' , this . options . uri + '?availabilityRequest=' + string , { success : function ( o ) { var obj = lang . JSON . parse ( o . responseText ) ; if ( obj === "true" || ! ! obj ) { this . onAvailable ( ) ; } else if ( obj === "false" || ! obj ) { this . onUnavailable ( ) ; } else { this . failure ( o ) ; } } , failure : function ( o ) { // TODO ? } , scope : this } ) ; }
Perform the Ajax request
Perform the Ajax request