JSFiddle - React, Tailwind, and code Playground
by Gonzalo
HTML
var xmlDoc = $.parseXML(xml);
this.options.$xml = $(xmlDoc);
this.options.$xml.find('profile').children().each(function(){
Dashboard[this.nodeName] = $(this).text();
});
localStorage.setItem('Dashboard', JSON.stringify(Dashboard));
JavaScript
$.ajax({
type: 'POST',
url: applicationPreferences.server + applicationPreferences.login_service,
data: this.options.params,
crossDomain: true,
dataType: 'text',
success: function(response){
self.parseResponse(response);
if (self.options.$xml.find('message').text() == 'Success')
window.location.href = self.options.$xml.find('url').text();
else
self.showAlert();
},
error: function(response){
self.showAlert();
}
});