JSFiddle - React, Tailwind, and code Playground
JavaScript
var id = 397;
var baseurl = "http://query.yahooapis.com/v1/public/yql?q=";
var q = "select * from json where url = 'http://89.92.40.250:8010/dreamteam/interface/get_event_detail.php?id="+id+"'";
var url = baseurl + encodeURI(q) + "&format=json&diagnostics=true";
var req = new XMLHttpRequest();
req.open("GET", url, true);
req.onreadystatechange = monCode;
req.send(null);
function monCode() {
if (req.readyState == 4) {
var data = JSON.parse(req.responseText).query.results;
console.log(data);
//console.log(data.event);
alert(data.event.title);
}
}