On 2012.07.16. 20:49, Robert Hanson wrote:


On Mon, Jul 16, 2012 at 11:31 AM, Gusts Kaksis <gusts.kak...@gmail.com <mailto:gusts.kak...@gmail.com>> wrote:

    Bob,

    I threw together a simple2.html with my approach (Jmol part only):

    http://dev.gusc.lv/code/jmol/simple2.html - it's on my
    devevelopment PC,
    so it might be a wee bit slow.

    Please take a look at the html source and at simple2.js file. From my
    point of view it's as simple as that, if you have any questions,
    I'll be
    happy to answer them.


Did you try that in MSIE? When I click on Load MOL+MEP I get:

LOG: there be error

Not sure what to do with that....
It seems that IE block's prompt windows. And not only does it block them, it seems that IE submits it, after what the AJAX request gets malformed and it results in an error. That error comes from error callback in AJAX request. I'll try to fix it.


    Few things to remember:
    1. jQuery Jmol is still just a thin abstraction layer over Jmol
    applet,
    everything else I've done in pure jQuery - like AJAX loaders etc.
    2. I haven't implemented the ChemDoodle yet.


Don't worry about ChemDoodle.

The main issue on that page is getting it to load just an image and to hide all buttons when it is on a mobile device that has no Java or WebGL.
Aah, I see, that's why I got a static image on my iPhone, OK.


    3. I quite didn't understand the point of sending a commands from
    JavaScript to Java, to prompt for the name of a molecule and then Java
    (if I'm not mistaken) calls JavaScript back to get a structure through
    AJAX. So I omitted that part and went straight to AJAX requests using
    browser's prompt dialog.


I think you are mistaken there. All processing is within the applet, which in this case is signed. Maybe what you are seeing is that without XHR2 capability, the unsigned applet has to do an AJAX call to the server, but that should be trapped initially anyway.
Yes, my bad. I didn't know about smilesURLformat and loadFormat and what's the parameter for ":" syntax URL? Anyhow, the AJAX approach is also a good solution if for example, the user does not want to use signed applet. I think. Also you can track requests through developer toolbar in Chrome :)

You sure that page works in browsers lacking XHR2? I doubt that.
Yes, jQuery states they support IE 6+ and almost any other browser http://docs.jquery.com/Browser_Compatibility
They had some tricky workaround using ActiveX, I think.

Bob

--
Gusts Kaksis

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to