On Mon, Jun 6, 2016 at 10:25 PM, Otis Rothenberger <osrot...@icloud.com>
wrote:

> Bob,
>
> I really like the convenience of the Jmol.loadFileFromDialog(jmolApplet0)
> feature, but I’d like to be able to trap a URL entry. When I run JSmol
> locally with no Internet connection, the jsmol.php file is not available
> for a URL that might need it. I’d like to trap a URL entry gracefully as
> needed below:
>
> 1) Model kit running via server - No trap needed.
> 2) Model kit running locally on computer WITH Internet connection: No trap
> needed.
> 3) Model kit running locally on computer WITH NO Internet connection: Trap
> needed.
>
> I detect all three states in my code. Is there a way to trap/check URL
> entry when code detects condition 3? Running locally with no Internet
> connection causes the page to hang on a URL entry looking for my jsmol.php
> file. I could trap condition 3 and turn off the dialog, but I’d like to
> keep it for local files.
>
>
Otis,


I think your best bet is to override

    Jmol._loadFileAsynchronously


adding your own event handlers there. That code is in JSmolCore.js

Local file loading never goes through JSmol.php. For local file reading,
the data is always a byte array, so binary or otherwise, it's all the same.


Bob
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to