This
OLCC programming example
page demonstrates getting a MOL file from
PubChem using JavaScript
Press the "test" button to evaluate the JavaScript in the textarea below.
Feel free to modify the JavaScript and press test again.
var url = "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/morphine/SDF?record_type=3d"; $("#url").html(url); $.ajax({ url:url, success: function(data){$("#result").html(data);} });
url:
result: