Actually, I think I'm hitting browser (IE and Chrome) permission issues
rather than problems with binary file handling per se.

See e.g.
http://wiki.jmol.org/index.php/Jmol_JavaScript_Object#Loading_the_library

It's tricky to put files in locations which both meet the requirements of
the CMS (Mahara), JSmol and most/all Browsers.

Have managed to get things working on a local webserver: http://localhost...
but not with (what I think is) much the same setup on a remote webserver:
http://whatever...

Do IE and Chrome have different permissions with http://localhost and
remote webservers?

I thought I had grasped the issues with local files and webserver hosted
files, but this seems to be another layer of complexity.

Cheers

Geoff


On 1 June 2013 12:02, Geoffrey Rowland <rowland.ge...@gmail.com> wrote:

> Hi
>
> I have been tinkering with integrating JSmol with the open source
> CMS/ePortfolio system Mahara. https://mahara.org
>
> It's working nicely for text data files (.pdb, .mol, .sdf, .xyz, .cif etc)
> but I'm having problems with binary files, specifically PyMOL Session files
> .pse with Chrome and Internet Explorer 10. Firefox, Opera and Safari work
> fine.
>
> As I understand it, the problem is that Mahara stores files as a number,
> without file extension. However, as JSmol does not usually require file
> extensions to identify file types, they can still be successfully loaded
> into JSmol with, for example:
>
> load "http://localhost/mahara/artefact/file/download.php?file=38&view=8";;
>
> I can also get binary PyMOL session files to load and display with JSmol
> in Firefox, Opera or Safari by appending, say, &ext=.pse to the load
> command, i.e. 'fooling' these browsers that the filename includes .pse (see
> http://wiki.jmol.org/index.php/Jmol_JavaScript_Object#Reading_binary_files
> )
>
> However, this does not work for Chrome or Internet Explorer 10. Chrome
> just crashes, though with Firebug reports:
>
> Error reading file at end of file
> Type Error:Object [object Object] has no method 'addAll'
> for file
> http://localhost/mahara/artefact/file/download.php?file=38&view=8&ext=.pse
> type PyMOL
>
> Have tried a few other things, such as prepending the load with PSE:: to
> try to force binary handling, but without success.
>
> I think I am using jsmol.php correctly. All browsers works fine for the
> dna.pse exemplar at http://chemapps.stolaf.edu/jmol/jsmol/test2.htm,
> /test3.htm, /jsmol.htm etc either at stolaf.edu or copied to my
> localhost. So, I presume it just needs some way of forcing Chrome and IE to
> recognise the PSE files as binary, when held in Mahara.
>
> Any suggestions? Have I overlooked something simple?
>
> Cheers
>
> Geoff
>
>
>
> <http://wiki.jmol.org/index.php/Jmol_JavaScript_Object#Reading_binary_files>
>
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to