Bob,
Two questions on this subject re spartan files:
1) I'm currently reading spartan files with a .txt suffix into JSmol. If I
understand you correctly, this is now browser dependent. Is this correct?
2) I can correct this problem by doing a server side script binary read,
followed by a base64 conversion. Is this correct? This latter would also solve
my suffix problem, since the script would read any file I feed it. It's the
service that creates my problem, and the script .aspx suffix will be served.
Otis
--
Otis Rothenberger
[email protected]
http://chemagic.com
On Feb 18, 2013, at 10:42 AM, Robert Hanson wrote:
>
>
>
> On Mon, Feb 18, 2013 at 9:05 AM, Gutow, Jonathan H <[email protected]> wrote:
> The issue is that I am trying to avoid having to use any server-side
> services. What happens is that with the double file extension .jmol.spt
> Safari and Chrome try to call for server help. If I issue the command
> 'script "<filename>.jmol.spt"' in the HTML5 console I get an error about
> "unrecognized command". In the past I have seen some issues with servers
> prefacing files that they don't know about with <doctype = "html"> lines and
> such. Maybe that is what is happening?
>
>
> Sounds right to me. You could rewrite the JSmolCore code to specifically
> exclude file names that end in .spt from the binary list, or you could also
> just remove ".jmol" from that list and see if that fixes it (and then not
> deliver .jmol files, or for them use .bin.jmol, for instance).
>
> If a file is a binary type, some browsers simply won't be able to read it
> ever from your hard drive. But they will from a server, provided you have the
> jsmol.php file installed there, which will convert the binary file to BASE64
> and pass it back to those binary-incapable browsers in that ASCII format.
>
> Anyway, I think you are not interested in binary files.
>
> pmesh does have a slight issue in that there are two formats -- one ascii
> and one binary. So if you have a problem SPECIFICALLY with that, then we
> might have to tweak Jmol to account for that.
>
>
>
> A test example can be seen at:
> http://www.uwosh.edu/faculty_staff/gutow/JSmol_math/JSmol-test3.html
>
>
> very very nice example. OK, so those are PNGJ format files, which are binary.
> What are you using for your server piece for that? MSIE also cannot read
> binary files that way. Oh, here it is:
>
> [09:31:55.530] ({color:"black", width:300, height:300,
> addSelectionOptions:false,
> serverURL:"http://chemapps.stolar.edu/jmol/jsmol/jsmol.php", defaultModel:"",
> script:"load test.jmol.png", src:"", readyFunction:"", use:"HTML5",
> jarPath:".", jarFile:"JmolApplet.jar", j2sPath:"./j2s",
> disableJ2SLoadMonitor:true, disableInitialConsole:true, isSigned:false,
> debug:false, targetdiv:"Jmol1", imageElem:"static_Jmol1",
> loaddiv:"appletdiv_Jmol1", AppletPoolID:1, name:"JmolApplet1", jsPath:".",
> console:"JmolApplet1_infodiv"})
>
> Note that you spelled "stolaf" incorrectly there. But that needs to point to
> a file on YOUR server, so that it is not a cross-domain call. (I think
> there's a hitch with cross-domain synchronous binary AJAX with some
> browsers.) That really should fix your problem.
>
> Just for reference, the issue that we have is a combination of:
>
> -- Jmol needs to read files synchronously, because file reading may be
> deeply embedded in scripts
> -- Jmol needs to read binary files
> -- Some applications of Jmol need cross-domain access
> -- Some applications of Jmol need local file access
>
> As far as I can tell, we are the first to address all these issues. jQuery by
> itself, out of the box, for example, cannot handle synchronous binary file
> transfer.
>
> In addition, there will always be a problem with that last one -- local file
> access -- because some browsers simply will not let AJAX do that. People
> requiring local file access need to use specific browsers and possibly
> specific platforms. There is no problem at all with Firefox/Windows. MSIE and
> Chrome cannot do local file access by AJAX. That's about all I know.
>
>
>
>
>
> Jonathan
> On Feb 18, 2013, at 8:23 AM, [email protected] wrote:
>
> > Message: 4
> > Date: Mon, 18 Feb 2013 08:23:21 -0600
> > From: Robert Hanson <[email protected]>
> > Subject: Re: [Jmol-users] I can't get chrome and safari to load JSmol
> > pages where all files are ASCII...
> > To: "[email protected]"
> > <[email protected]>
> > Message-ID:
> > <CAF_YUvV72M6yGhuK_MZQuL519=wd59ivuourefylztyv6jn...@mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > also, where is it failing? You should be able to find a message in the
> > console.
>
> Dr. Jonathan H. Gutow
> Chemistry Department [email protected]
> UW-Oshkosh Office:920-424-1326
> 800 Algoma Boulevard FAX:920-424-2042
> Oshkosh, WI 54901
> http://www.uwosh.edu/facstaff/gutow/
>
>
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
> is your hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials, tech docs,
> whitepapers, evaluation guides, and opinion stories. Check out the most
> recent posts - join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Chemistry Department
> 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
>
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
> is your hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials, tech docs,
> whitepapers, evaluation guides, and opinion stories. Check out the most
> recent posts - join the conversation now.
> http://goparallel.sourceforge.net/_______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users