From: Roberto M. <rob...@gm...> - 2014-01-24 17:02:11
|
Dear all, I am experiencing a strange problem with JSmol. I have a JSmol applet on my page and a link to download the PDB file. The link works by setting "window.location" to a php page that forces the download of the PDB file (via headers like "Content-Disposition: attachment; filename=...") without actually leaving the papge where the Jmol applet is. The problem is that the Jmol applet works perfectly before I click on the link, and when I click there the browser dowloads the file but then the Jmol applet freezes. I had a look at the Javascript console and it turns out that if I try to do anything with Jmol after clicking on the link to download the PDB file I get a long list of errors: Uncaught TypeError: Cannot read property 'viewer' of null JSmol.min.nojq.js:80 g._processEvent JSmol.min.nojq.js:80 (anonymous function) JSmol.min.nojq.js:55 p.event.special.(anonymous function).handle jquery-1.8.2.min.js:2 p.event.dispatch jquery-1.8.2.min.js:2 g.handle.h Any ides of why it is so? Am I doing something wrong? Let me know. Best, Roberto Roberto Mosca, Ph.D. Structural Bioinformatics and Network Biology Institute for Research in Biomedicine (IRB Barcelona) Parc Científic de Barcelona C/ Baldiri Reixac 10 08028 Barcelona - Spain Email: rob...@ir... Tel: +34 93 40 39689 Web: http://sbnb.irbbarcelona.org/people/roberto_mosca |