Just to add some motivation for not using this facility. The reason that browsers and security add-ons like NoScript make this difficult is because it is one common symptom of somebody trying to attack you. They plant a link to their own code somewhere in a perfectly respectable web page that either you need to click on, or in an ideal world from their point of view, the link is loaded automatically.
So programs try to help users by blocking this kind of behaviour by default. And helpful site authors try to help such users by never using cross-domain scripting. Always host a copy of the scripts on your own domain and serve them from there. It also gives you a more reliable site. At best a paranoid user like me has to do extra clicking to see a page that uses cross-domain scripts. But typically I won't even bother, I'll just find some other site that serves the information in what I view as a more responsible way. Cheers, Dave PS and yes, I'm aware that some large, well-known site do this. That doesn't make it right. On 2016-09-10 11:44, Angel Herráez wrote: > (moving this to the users list) > > Hello, Graeme > In principle, yes, it is possible to load the JSmol libraries from a server > different to the one that hosts the page. > > However, the browsers may impose security restrictions for cross-browser > access in certain circumstances (I don't know the precise details) > > I believe you should be able to do this. Make sure that you load JSmol.min.js > from the same server as the j2s folder, and try different browsers. > > Example: > http://biomodel.uah.es/Jmol/audio.htm > works fine in Firefox and Chrome, at least > > > > On 10 Sep 2016 at 3:31, Kidd, Graeme wrote: > > Would it be possible for JSmol to support the loading of the "j2s" and "java" > folders from > an external host? Currently when you put a full URL in the "j2sPath" or > "jarPath" variables > the following error appears: > "[Java2Script] The required class file > http://externalhost.com/jsmol/j2s/core/package.js > could not be loaded. Script error: Unexpected token < data: <!DOCTYPE html > PUBLIC..." > Going to http://externalhost.com/jsmol/j2s/core/package.js does load the file > without any > problems. > Thanks, > Graeme > > Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With > campuses and students across the entire globe we span the world, delivering > innovation and educational excellence in business, engineering, design and the > physical, social and life sciences. > The contents of this e-mail (including any attachments) are confidential. If > you are not the intended recipient of this e-mail, any disclosure, copying, > distribution or use of its contents is strictly prohibited, and you should > please notify > the sender immediately and then delete it (including any attachments) from > your system. > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-users > ------------------------------------------------------------------------------ _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users