Forums > Javascript

xmlhttprequest

June 22, 2012 | 5:21 pm

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


June 25, 2012 | 8:42 am

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.


June 25, 2012 | 11:17 am

Thank you!
It works with matrix output.


June 25, 2012 | 2:56 pm

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


Viewing 4 posts - 1 through 4 (of 4 total)