bob, i remember having troubles with sdf files, but not all sdf files. i ll let
u know soonpino
----Messaggio originale----
Da: hans...@stolaf.edu
Data: 07/03/2014 18.42
A: "jmol-users@lists.sourceforge.net"<jmol-users@lists.sourceforge.net>
Ogg: [Jmol-users] Problem with Firefox and PubChem download
I could swear this was working yesterday, so I think it is quite new.
Something has changed at PubChem or with Firefox. I don't think it is Firefox,
because I downgraded to FF 26.0 temporarily, and the problem persists.
Problem: JSmol/HTML5 cannot download PubChem SDF files.
Configuration: Firefox 27.0.1/Windows 8
Example: http://chemapps.stolaf.edu/jmol/jsmol/jsmol.htm -- click on :caffeine
link
Observation 1: JSmol reports "unrecognized file format"
Observation 2: No problem in MSIE or Chrome
Observation 3: Same problem local or website
Observation 4: Same problem with older, stable version of Jmol at
http://chemapps.stolaf.edu/jmol/jsmol-2014-01-24/jsmol.htm
Observation 5: The following simple direct AJAX call fails under the exact same
conditions as above:
alert($.ajax({"dataType":"text","async":false,"type":"GET","url":"http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/caffeine/SDF?record_type=3d"}).responseText)
Observation 6: The following simple AJAX call
alert($.ajax({"dataType":"text","async":false,"type":"GET","url":"http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/caffeine/SDF?record_type=3d"}).statusText)
reports "OK" in other browsers but
[Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location:
"JS frame :: file:///C:/jmol-dev/workspace/JSmol/site/jsmol/jquery/jquery.js ::
.send :: line 8707" data: no]
in Firefox.
Observation 7:
The following simple AJAX calls to a similar site work fine:
alert($.ajax({"dataType":"text","async":false,"type":"GET","url":"http://cactus.nci.nih.gov/chemical/structure/caffeine/file?format=sdf&get3d=True"}).responseText)
alert($.ajax({"dataType":"text","async":false,"type":"GET","url":"http://cactus.nci.nih.gov/chemical/structure/caffeine/file?format=sdf&get3d=True"}).statusText)
The difference appears to be that PubChem is returning data with response type
of chemical/x-mdl-sdfile, which forces a special download, as with PDF.
Comments welcome.
Bob
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
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
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users