Ah, I’d been putting console.log() calls in JSMol.min.js, but hadn’t been 
getting very far…  Contents of JSMol’s javascript console is below. I’d grepped 
the jsmol directory for ‘zapped’, but couldn’t see anything obvious that would 
cause the error. I couldn’t even work out if it was files in j2s/ or js/ which 
were causing the problems! I’ve been using Chrome’s js console, and put some 
breakpoints in, but was still a bit confused as to the order functions were 
being called in…

loading... j2s/core/package.js
loading... j2s/core/core.z.js -- required by ClazzNode
Jmol JavaScript applet jmolApplet0__842601713258773__ initializing
Jmol getValue debug null
Jmol getValue logLevel null
Jmol getValue allowjavascript null
AppletRegistry.checkIn(jmolApplet0__842601713258773__)
vwrOptions:
{ 
"name":"jmolApplet0","applet":true,"documentBase":"http://localhost:8000/molecule_preview.htm","platform":"J.awtjs2d.Platform","fullName":"jmolApplet0__842601713258773__","codePath":"http://localhost:8000/j2s/","display":"jmolApplet0_canvas2d","signedApplet":"true","appletReadyCallback":"Jmol._readyCallback","statusListener":"[J.appletjs.Jmol
 object]","syncId":"842601713258773","bgcolor":"white" }
setting document base to "http://localhost:8000/molecule_preview.htm";
(C) 2012 Jmol Development
Jmol Version: 14.1.17_2014.06.09 2014-06-09 20:33
java.vendor: Java2Script (HTML5)
java.version: JSmol 14.1.14 Apr 27, 2014
os.name: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like 
Gecko) Chrome/36.0.1985.125 Safari/537.36
Access: ALL
memory: 0.0/0.0
processors available: 1
useCommandThread: false
appletId:jmolApplet0 (signed)
Jmol getValue emulate null
defaults = "Jmol"
Jmol getValue boxbgcolor null
Jmol getValue bgcolor white
backgroundColor = "white"
Jmol getValue ANIMFRAMECallback null
Jmol getValue APPLETREADYCallback Jmol._readyCallback
APPLETREADYCallback = "Jmol._readyCallback"
Jmol getValue ATOMMOVEDCallback null
Jmol getValue CLICKCallback null
Jmol getValue ECHOCallback null
Jmol getValue ERRORCallback null
Jmol getValue EVALCallback null
Jmol getValue HOVERCallback null
Jmol getValue LOADSTRUCTCallback null
Jmol getValue MEASURECallback null
Jmol getValue MESSAGECallback null
Jmol getValue MINIMIZATIONCallback null
Jmol getValue PICKCallback null
Jmol getValue RESIZECallback null
Jmol getValue SCRIPTCallback null
Jmol getValue SYNCCallback null
Jmol getValue STRUCTUREMODIFIEDCallback null
Jmol getValue doTranslate null
language=en_US
Jmol getValue popupMenu null
Jmol getValue script null
Jmol getValue loadInline null
Jmol getValue load null
Jmol applet jmolApplet0__842601713258773__ ready
loading... j2s/core/corescript.z.js
script 1 started

FileManager.getAtomSetCollectionFromFile(zapped)
FileManager opening 1 http://localhost:8000/zapped
Time for openFile(zapped): 94 ms
File Error:unrecognized file format for file
http://localhost:8000/zapped

<head>

<title>Error response</title>

</head>



loading... j2s/core/coretext.z.js
script ERROR: unrecognized file format for file
http://localhost:8000/zapped

<head>

<title>Error response</title>

</head>



----
>> load <<
Script completed
Jmol script terminated
loading... j2s/core/coremenu.z.js
loading... j2s/core/coreswing.z.js -- required by J.popup.JmolGenericPopup


From: Robert Hanson [mailto:[email protected]]
Sent: 01 August 2014 15:16
To: [email protected]
Subject: Re: [Jmol-users] Server-side scripts

Great! Or at least almost great!

"zapped" is the name given to the "current model" after the ZAP command. 
Something in your code is trying to load that as a file and, of course, not 
finding it. It's not Jmol code that is doing that, I think.

Web site for viewing?

probably need the report that is going to the JavaScript console "behind" the 
applet viewable with the drop-down  menu item "JavaScript Console"
You can add all sorts of debuging messages
document.title = ....
or
System.out.println(.....)

or
alert(...)

into JSmol.



On Fri, Aug 1, 2014 at 8:57 AM, 
<[email protected]<mailto:[email protected]>> wrote:
Due to the setup of a server I’ve got, I’ve rewritten the part of the PHP 
script which deals with converting binary to base64 into python, including 
setting the correct headers; the output I get seems identical to the output 
from the original PHP script. However, running the file results in:

Unrecognized file format for file http://localhost/zapped

<head>

<title>Error response</title>

</head>

Is there anything I can do to get around this?!

Cheers,
Chris

-------------------
Dr Chris Wood
STFC Rutherford Appleton Laboratory
Didcot
OX11 0QX

[email protected]<mailto:[email protected]>
www.ccpem.ac.uk<http://www.ccpem.ac.uk>

Tel: +44(0)1235 567864<tel:%2B44%280%291235%20567864>
Tel: +44(0)7909 586624<tel:%2B44%280%297909%20586624>
Fax: +44(0)1235 567801<tel:%2B44%280%291235%20567801>

Skype: chris_c_wood<callto://chris_c_wood/>



--
Scanned by iCritical.


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Jmol-users mailing list
[email protected]<mailto:[email protected]>
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


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
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to