On Mon, Jan 12, 2009 at 5:59 PM, Justin Clift <[email protected]> wrote: > Henry Minsky wrote: >> Are you trying to load data from a server which is different from the >> one which the application >> loaded from? > > Hi Henry, > > Was trying to, yes. Seems the DHTML version of things is extremely > paranoid, not even allowing mapping to the same server but on a > different port (i.e. from HTTP to HTTPS). > > Have had to move the whole application behind the SSL secured port, just > to get this one (crucial) request working. Non-optimal, but hey, if > that's what it takes. ;-> > > Saw mention on some AJAX forums that they use generally use JSON for > requests to different domains, purely because of this problem with DHTML. > > Any idea if OL will support JSON in the reasonably near future? Being > able to authenticate to a different host&port would really help being > able to scale cost effectively. ;>
We haven't really done a design for a JSON data API, but Openlaszlo does use JSON internally for some things; the Java RPC and XMLRPC services actually consume JSON sent from the server. So there is a JSON parser (in lps/components/rpc/library/json.js) which works in all the runtimes. If you're using the DHTML runtime, the code which loads <import> libraries at runtime uses a routine to load a script file from a server, it is lz.embed__dhtmlLoadLibrary(url) (defined in lps/includes/source/embednew.js, as part of the HTML wrapper ). I suppose that might work to load a JSON document as well if there were some convention as to where the JSON value gets stored when it is loaded. But we definitely should look at how to integrate JSON data better. > > Regards and best wishes, > > Justin Clift > > >> >> >> >> On Mon, Jan 12, 2009 at 1:43 PM, Justin Clift <[email protected]> wrote: >>> Hi all, >>> >>> Trying to figure out how to do HTTPS requests (for securing >>> authentication) from an in-development web app. >>> >>> Older documentation and references exist online, pointing to the >>> existence of a "secure" attribute for the <dataset> tag. However, that >>> attribute doesn't seem to exist any more. >>> >>> Asking because I've been trying out various combinations of options to >>> get a request to a HTTP url happening, and so far nothing is hitting >>> that server. :/ >>> >>> ie. Using things like: >>> >>> src="https://www.example.com/some-url-here-with-args" secureport="443" >>> src="http://www.example.com/some-url-here-with-args" secureport="443" >>> >>> Trying to add a "secure" option to the above just generates an error. >>> >>> Thoughts/ideas/suggestions? >>> >>> Regards and best wishes, >>> >>> Justin Clift >>> >>> -- >>> Salasaga - Open Source eLearning IDE > > > -- > Salasaga - Open Source eLearning IDE > http://www.salasaga.org > -- Henry Minsky Software Architect [email protected]
