Great advice guys, thanks. I downloaded new.js and JmolPopup.htm from Bob's site, added them to the directory with all the Jmol files and all is well. I have a shiny new window every time. I suppose I expected these features to be part of the standard cutting edge distribution by now but I see the latter was modified earlier today! Bob never sleeps.

All the best
Nick
--
WWW Pages:     http://www.liv.ac.uk/Chemistrywww/Staff/greeves.html
Tel:             +44 (0)151-794-3506 (3500 secretary)


On 19 Oct 2007, at 17:27, [EMAIL PROTECTED] wrote:


I had just assumed that this function would make it's way into
"Jmol.js", but obviously this assumption was wrong.
The function is defined in
http://chemapps.stolaf.edu/jmol/docs/examples-11/new.js

Regards,
Rolf

As Rolf says, the function is not in Jmol.js, but in one of Bob's
files, new.js  It says:

function newAppletWindow() {
 var sm=""+Math.random()
 sm=sm.substring(2,10)
 var newwin=open("JmolPopup.htm","jmol_"+sm,woptions)
}

So, it just opens a resizable* window loading JmolPopup.htm page

(*) since it uses
woptions="menubar=yes,resizable=1,scrollbars,alwaysRaised,width=600,
height=600,left=50"

BTW, as far as I know you can shorten to
woptions="menubar,resizable,scrollbars,alwaysRaised,width=600,
height=600,left=50"

JmolPopup.htm has a standard call to jmolApplet
but with the size arguments made to fit the window:
        jmolApplet(["100%","90%"]
and then to collect a script from the opening page

El 19 Oct 2007 a las 16:27, Nick Greeves escribi?:


I'm still struggling with creating a button to pop out a large Jmol
window like you have below your windows as standard.


So, you can just do something like

<input type="button" value="new window"
onClick='newAppletWindow()'>

if you
1) create a JmolPage.htm or copy Bob's JmolPopup.htm
2) define (or copy) newAppletWindow() in your page
3) a mechanism for passing the script from parent to child window, or
to read it from opener window as Bob's does.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to