Eric makes a good point, and I would certainly recommend using JavaScript/HTML 
buttons in the main page to control the framed model rather than controls in a 
second frame. On the other hand, a frame, particularly an iframe, is often very 
useful for a JSmol window. This approach allows you to essentially create an 
isolated “Jmol App” within your page. I find this useful programmatically and 
maintenance-wise.

If your main page controls are JavaScript/HTML buttons, then the reference to 
the frame simply becomes:

document.getElementById("modelFrameID").contentWindow.iFramePageJmolScriptFunction()

JSmol pages don’t work on old browsers, so iframes are not the headache that 
they used to be. If JSmol works in the user’s page, iframes should not be a 
problem. I use them all the time.

Otis

--
Otis Rothenberger
o...@chemagic.com
http://chemagic.com

> On Apr 2, 2015, at 11:43 AM, Eric Martz <ema...@microbio.umass.edu> wrote:
> 
> Try using divisions instead of frames. That is how I have structured 
> firstglance.jmol.org for many years. It worked with very old versions of 
> Jmol and still works. Let me know if you want more details.
> Eric
> 
> On 4/2/15 9:51 AM, Pat Carroll wrote:
>> I have many old html web pages with previous versions of Jmol (as far back 
>> as version 10!). Now that I’m converting to JSmol, I find that those pages 
>> that use html-coded frames don’t work. I have the JSmol display in one frame 
>> and a menu script in another. The display works and any script commands in 
>> the same frame as the JSmol display work, but the menu scripts in the other 
>> frame do not.
>> 
>> Is there a reason for this? Is there a way around it?
>> 
>> 
>> Pat
>> 
>> Patrick J. Carroll, Ph.D.
>> Director, X-ray Crystallography Facility
>> Department of Chemistry
>> University of Pennsylvania
>> Philadelphia, PA
>> 
>> Phone: 215-898-3505
>> Web: http://crystal.chem.upenn.edu
>> 
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website, 
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for 
>> all
>> things parallel software development, from weekly thought leadership blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>> 
> 
> 
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users




------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to