On Mon, Aug 6, 2012 at 6:38 AM, Gusts Kaksis <gusts.kak...@gmail.com> wrote:
> On 2012.08.06. 14:07, Robert Hanson wrote:
> It's the same as why do you need an addButton method then :) If you're
> building a helper library to aid development, it's for the best to add more
> helpful functions than less. And it's still the same argument between you
> and me, weather molecule files should be linked with an anchor, which in
> case of Jmol's/JavaScript's or any other failure would allow the client to
> download it and view it in, for example, Avogadro.
>
>
That's why we have the WRITE command. But I think you were thinking that
this would be useful specifically if JavaScript is disabled, not as a way
to generally download a file. It's not for me to say remove it, only to
point out its limited usefulness.
> For example my father is hosting all the molecular data files him self, so
> it would be useful for him, to load them as a file from server, meanwhile
> allowing his students to download the mol file and edit it in ISIS/Draw. So
> I don't see a point why not.
>
> I don't know. That site is reporting that I don't have JavaScript
> enabled, which I do. So something is amiss there.
>
> Which browser (version) does report that? Might be cache? I just opened
> it up in IE8, Firefox 13, Chrome and it works.
>
>
Looks like you got it. It's working now.
> I get the applet in Firefox, but the Show/Hide MEP button is not
> working. (That's just because you are using an older version of Jmol.)
>
> Yes, I see - if you use Load + MEP it will show MEP and "Show/Hide MEP"
> button will hide it, but it will not restore it. There seems to be a
> problem either in the version of Jmol (I'm using 12.2.32) or the script
> itself (it's in data-script attribute). But I copied it from your site, so
> I don't know...
>
exactly. You need 12.3 for that, now 13.0.RC4
>
>
>
>
>> The trick with IE8 and 9 is that you have to use XDR (XDomainRequest),
>> which is basically the same as XHR, just, as usually, the Microsoft way.
>> And with this jQuery plugin iecors (
>> https://github.com/dkastner/jquery.iecors) it adds XDR as an AJAX driver
>> (instead of default XHR), so to speak.
>>
>
> Ah, interesting. Good. Still, that requires sites delivering the proper
> header.
>
> You mean "Access-Control-Allow-Origin: *"? Yes it does, but it's the
> default cross-domain behavior.
>
No, it's not. You need that or at least XHR does not work. Absolutely not
the default behavior. I just recently requested several sites implement
that, and only after that implementation did the cross-browsing option work.
>
>
>
>
>
>>
>> Also, how are you handling the caching of script requests prior to applet
>> initialization?
>>
>> It's done. You can actually call my jmolscript() prior to any
>> initialization, but you might need an id attribute set.
>>
>> Q: What about the destroy method in Jmol applet's interface? Is it
>> possible to create one? And will it help the situation with IE, when I want
>> to remove applet from DOM tree without crashing the browser? I've done
>> server side Java development, but I've never developed Java browser
>> applet's so that's kind of an unknown territory for me.
>>
>
> The applet detects when it has been destroyed and clears itself out,
> passing a callback to appletReadyCallback with a parameter false.
> I have not experimented with removing the applet from the DOM tree, but
> even doing a display:none on it in CSS destroys the applet in MSIE. Don't
> do that.
>
> Ahh, OK, well I'll play around that and do my internal cleanup in
> onDestroy callback (jQuery-Jmol callback, not Jmol). This thing is kind of
> important for performance. For example I'm showing a placeholder image of
> some molecule instead of Jmol applet, and I have some 30-60 molecules on
> the page.
>
This is considered bad design. We strongly disrecommend it. A single
applet, a scrollable interface, or something like that is preferred.
Certainly, of course, you can somehow start up a new applet each time. A
possibility is to move the div elegantly from one to the other without the
user being the wiser and just use one applet. Or populate data in divs on
the fly rather than have some long scrolling list of images/applets.
> So I'd like to enable Jmol on click and disable other Jmol instance that's
> already visible. I'm afraid of the performance hit on client side with 60
> instances of Jmol. :/
>
> --
> 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
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
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