xmlhttprequest

rolodub's icon

Hello,
I'm trying to make a GET XMLHttpRequest with no succes using javascript.
Here is my code:
function httpGet()
{
    var theUrl=arguments[0];
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );

xmlHttp.send();
outlet(1,xmlHttp.responseText)
}

Error in the Max window:
js: rest.js: Javascript ReferenceError: XMLHttpRequest is not defined, line 5

Thanks for any clues...
Roland

pdelges's icon

XMLHttpRequest is not part of the JS Core Language, it's defined in browsers but not in Max.

You may have a look at jit.uldl instead.

rolodub's icon

Thank you!
It works with matrix output.

rolodub's icon

Ok, it works for a sort of GET request.
How can I send a http POST request WITHOUT using java?
I thought using Jweb but it can only show urls or files....

thanks for sharing your brains!
Roland