JSFiddle - React, Tailwind, and code Playground
HTML
<div id="control">
<input name="email"/>
</div>
CSS
.pass {
background-color: green;
}
.fail {
background-color: red;
}
JavaScript
$(function () {
$.ajax({
dataType: "json",
type: "GET",
url: "https://identity.auth.theplatform.com/idm/web/Authentication/signIn?schema=1.0&_duration=86400000&_idleTimeout=14400000&username=mpx/ufm-direct-upload-user&password=Pearson123&form=json",
success: function(data) {
$('#token').val(data.signInResponse.token);
var x= {};
x.$xmlns = {};
x.title = "DIRECT_UPLOAD_TEST";
var y = JSON.stringify(x);
debugger;
$.ajax({
url: "http://query.yahooapis.com/v1/public/yql",
// The name of the callback parameter, as specified by the YQL service
jsonp: "callback",
// Tell jQuery we're expecting JSONP
dataType: "jsonp",
// Tell YQL what we want and that we want JSON
data: {
q: "select title,abstract,url from search.news where query=\"cat\"",
format: "json"
},
// Work with the response
success: function( response ) {
alert(response)
console.log( response ); // server response
}
});
}
});
});