Question about HTML5 and accessing urls

Terry Judd terry.judd at unimelb.edu.au
Mon Mar 26 21:20:45 EDT 2018


Hi - I’m updating a HTLM5-based simulation that we use for training assessors. It captures some usage data so that we can confirm a) that someone has attempted it and b) that they completed all the necessary elements. It was built with an older version of LC community (not sure which version) and relied on the do as javascript thing to export the data to a server via a php routine someone wrote for me.

Anyway, now that the HTML5 engine handles urls internally I thought I’d do away with the do as javascript and php combo (which I not sure was completely reliable – either that or there were a lot of assessors who said they had completed the training when they hadn’t) I thought I could switch to uploading the data to Dropbox (which is something that I’m more familiar with and doesn’t require me to pester our server administrator every time I want to check the uploaded data).

I’ve just done a quick test using the community version of LC 9.0.0 (rc-1) and my own version of a dropbox library and it seems to upload and download data just fine when I use the ‘test’ option in the IDE to launch it in a browser. My question is, will this still work once I serve the ‘app’ up from a real server given that it and dropbox are occupying different domains? I seem to recall something about url access being restricted but wasn’t sure what the actual implications of that were.

As an extra thing – even though it appears to be supported, I wasn’t able to add and use LC’s JSON Library (for parsing the response from dropbox) to my basic test app as it immediately throws and exception. Any ideas on what might be going on there? I’ve switched to a script-based jsonToArray routine that I  picked up from the forum (fastJson), which seems to work really well, in the meantime.

Regards,

Terry...


More information about the use-livecode mailing list