Last active
October 19, 2016 13:34
-
-
Save klhall1987/02e23b3d92947a825e146702329ca851 to your computer and use it in GitHub Desktop.
Force SSL Fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.ajax({ | |
url: nfFrontEnd.adminAjax, | |
type: 'POST', | |
data: data, | |
cache: false, | |
xhrFields: { withCredentials: true }, | |
success: function( data, textStatus, jqXHR ) { | |
try { | |
var response = jQuery.parseJSON( data ); | |
nfRadio.channel( 'forms' ).trigger( 'submit:response', response, textStatus, jqXHR, formModel.get( 'id' ) ); | |
nfRadio.channel( 'form-' + formModel.get( 'id' ) ).trigger( 'submit:response', response, textStatus, jqXHR ); | |
} catch( e ) { | |
console.log( 'Parse Error' ); | |
} | |
}, | |
error: function( jqXHR, textStatus, errorThrown ) { | |
// Handle errors here | |
console.log('ERRORS: ' + textStatus); | |
// STOP LOADING SPINNER | |
nfRadio.channel( 'forms' ).trigger( 'submit:response', 'error', textStatus, jqXHR, errorThrown ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment