xmlhttprequest

Jun 22, 2012 at 5:21pm

xmlhttprequest

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

#43882
Jun 25, 2012 at 8:42am

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.

#157585
Jun 25, 2012 at 11:17am

Thank you!
It works with matrix output.

#157586
Jun 25, 2012 at 2:56pm

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

#157587

You must be logged in to reply to this topic.