ajax working exterally for phonegap