Jump to content

Mokomoko Bayn

Resident
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Mokomoko Bayn

  1. Hey guys, I'm using this Javascript var xmlHttp = null; try { // Mozilla, Opera, Safari sowie Internet Explorer (ab v7) xmlHttp = new XMLHttpRequest(); } catch(e) { try { // MS Internet Explorer (ab v6) xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { try { // MS Internet Explorer (ab v5) xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { xmlHttp = null; } } } if (xmlHttp) { xmlHttp.open('POST', 'URL OF MY PRIM', true); xmlHttp.send('My Data'); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { alert(xmlHttp.responseText); } }; } My LSL Script looks like this: key url_request; default { state_entry() { url_request = llRequestURL(); } http_request(key id, string method, string body) { if (url_request == id) { url_request = ""; if (method == URL_REQUEST_GRANTED) { llOwnerSay("URL: " + body); } else if (method == URL_REQUEST_DENIED) { llOwnerSay("Something went wrong, no url. " + body); } } else { llHTTPResponse(id, 200, "I received your data!"); } } } The data is received by my inworld object but the response is empty in my Javascript alert function. Any ideas? greetings, Mokomoko Bayn P.S.: Sorry for my bad english but I'm from germany ;)
×
×
  • Create New...