Bob, I wanted to do this directly (bypass Jmol) because I don’t want to use the JSmol window. I’ve been using a JQuery AJAX call to do this, but this started to fail recently. After doing some research, I saw that this was a common problems because of browser problems. There are a number of solutions, including a new browser standard - all convoluted as heck in my opinion.
Am I missing something here? In order to get that PubChem sdf directly into a JavaScript variable, I need to use AJAX. Is this point correct? There’s another possibility: JQuery has an app library for AJAX that supposedly handles this problem $.ajax. Recently, I started using JSmol.min.nojq. Is it possible that this is the origin of my problem - i.e. Jmol JQuery uses the AJAX app? I guess one solution would be to include a faceless Jmol applet to do this dirty work for me. Is the faceless applet still an option? Otis -- Otis Rothenberger o...@chemagic.com http://chemagic.com > On Aug 31, 2015, at 11:00 AM, Robert Hanson <hans...@stolaf.edu> wrote: > > > > On Mon, Aug 31, 2015 at 9:50 AM, Otis Rothenberger <osrot...@chemagic.com > <mailto:osrot...@chemagic.com>> wrote: > Bob, > > Since the direct load of a model from PubChem works, PubChem must be allowing > this with a proper Access-Control-Allow-Origin setting. I understand that. > > On the JSmol client side, you still have to deal with the cross-origin AJAX > problem to complete the load. Am I correct on this point? > > > > > If so, how are you dealing with this AJAX problem? > > > nothing to do, since they use Access-Control-Allow-Origin * > > > > My problem is that I need the 2d sdf for the appended data, not the > coordinates. I was getting this with regular AJAX via direct access, but this > has changed in browsers recently because of tightening of the cross origin > policy. Currently, I'm using my server as a proxy, but PubChem help techs say > they really do not like the proxy approach. > > > I don't know what the problem should be. Pretty sure if you use > > > data = Jmol.evaluateVar(jmolApplet0, "load(':caffeine')") > > > you get it. Right? > > > > Otis > > -- > Otis Rothenberger > o...@chemagic.com <mailto:o...@chemagic.com> > http://chemagic.com <http://chemagic.com/> > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net <mailto:Jmol-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/jmol-users > <https://lists.sourceforge.net/lists/listinfo/jmol-users> > > > > -- > Robert M. Hanson > Larson-Anderson Professor of Chemistry > Chair, Department of Chemistry > St. Olaf College > Northfield, MN > http://www.stolaf.edu/people/hansonr <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 > > ------------------------------------------------------------------------------ > _______________________________________________ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net <mailto:Jmol-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/jmol-users > <https://lists.sourceforge.net/lists/listinfo/jmol-users>
------------------------------------------------------------------------------
_______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users