Get Jitter jit.textfile into javascript js
I'm using jit.uldl to download a long text string from my website. Then I use jit.textfile to view it as text. But now I need to get that text into a js object and I'm having trouble. I used to use jit.str.tosymbol but symbols are limited to 2047 characters. So I need to get the jit.textfile output directly into javascript. Can you please help? I've looked everywhere and can't seem to find any help on this.
I've been successful at getting the jitter matrix into javascript, but I don't know how to look at the text string.
I suppose one option is to save the jit.textfile as a text file and then reload that into javascript. But is there a direct way to pass jit.textfile to javascript?
You could try my mxj utility to download a url:
https://github.com/natcl/max_geturlcontent
this will output the url content and you can pipe directly to js..
Brilliant! Thank you! I'll give it a try.
Nat, would this be possible inside of javascript? So I can just make a GET call directly within javascript and bypass all this extra patching?
Sadly I don't think so, I don't think we have access to that api from javascript, that's why I did the java object...
seems to work here with the attachment, can you share the url of the data ?
Ok, so tommymetz.com/test.php is the long one (which crashes max for me) and tommymetz.com/test_short.php is the short one which works. Do they both work for you?
I wonder if it's some sort of java issue on my end?
Thanks for your help with this btw!
That's strange, both work for mw here...
what's your os, max version ?
windows 7, max 6.0.7. It's weird. It just closes max the second I try and parse the url. I've had that problem when working with mxj objects in the past. No idea what's up. I may just have to do multiple jit.uldl calls to get the string in smaller chunks.
Thanks a ton for your help tho. Maybe I'll try your object on max 6.1 and windows 8. Is there a place I can view some java logs?