var res = JSON.stringify("Success!");
var callback = parsed.query.callback;
if (callback != undefined) {
res = callback+"("+res+")";
}
response.write(res);
//response.writeHead(200, {'Content-Type': 'text/plain'});
response.writeHead(200, {'Content-Type': 'application/json'});
//response.write("Success!");
var res = JSON.stringify({test:"passed"});
response.write(res);
console.log(res);
var aj = $.getJSON(
"http://localhost:8888/callback=?",
{ nnn: form.nnn.value}
);
aj.done(function(data) {
$("pre").text(data);
});
aj.fail(function(statusObj,errInfo) {
alert(statusObj.statusText+"\n"+errInfo);
});
{"test":"passed"}