Oh, wait, is that it? Does Safari NOT support LiveConnect? (Can you do any dynamic applet scripting at all with Safari? Maybe you can't. Someone's told me this ten times....)
Bob
Philip Bays wrote:
But not with Safari,a s far as I can tell. I see nothing happen when I click the resize link.
Phil
On Mar 4, 2005, at 4:20 PM, Bob Hanson wrote:
Actually, this was just that dumb requirement that with Netscape 7.2 now you have to use
setTimeout("document.jmol.script('show orientation')",100)
not just
document.jmol.script('show orientation')
if the calling function was a clicked link.
That is, you can't call the .script() command directly from a link, like:
function resizeApplet(){ document.jmol.script('show orientation') }
<a href=javascript:resizeApplet()>resize now</a>
or even just
<a href="javascript:document.jmol.script('show orientation')">js-resizeApplet()</a>"
A reminder for all you I.E. users out there! I BELIEVE that page there now works with NN and IE.
Bob Hanson
Bob Hanson wrote:
Craig, I'm also reminded that I wrote a page the purports to do applet resizing: http://www.stolaf.edu/people/hansonr/jmol/docs/examples/resize.htm Today I can't get it working in Netscape 7.2, but it seems to work in IE. Note that as you resize, the molecule is redrawn with the same orientation as the user had left it. But I can't figure out why this is not working in Netscape. Crashes every time for me. Bob Bob Hanson wrote:
Craig T. Martin wrote:
Bob,
I'm all ears.
At any rate, if everything is written from Javascript, then you can size as you like...
Right, so, for example, at
http://www.stolaf.edu/people/hansonr/jmol/docs/examples/scaletest.htm
You can see from that code that I am setting the size of the applet from the URL line. So, for example:
http://www.stolaf.edu/people/hansonr/jmol/docs/examples/scaletest.htm?width=100;height=100
Since one has the JavaScript variables:
screen.width screen.height
you know what the user has for a display.
And since you have
window.width window.height
you know if this is in a smaller window. Of course, that could change in the course of a page's existance, thus
<body onresize=xxxx()>
But, actually, I wouldn't fool with that. It's proven problematic and unreliable. You can't dynamically resize the applet, anyway, except by rewriting it to a span, div, or frame.
Bob
Craig Martin
http://www.chem.umass.edu/~cmartin/JmolShell
--On March 4, 2005 7:59:32 AM -0800 [EMAIL PROTECTED] wrote:
Message: 4 Date: Fri, 04 Mar 2005 07:15:43 -0600 From: Bob Hanson <[EMAIL PROTECTED]> To: [email protected], Chem Web Developers <[EMAIL PROTECTED]> Subject: Re: [Jmol-users] Re: use of frames Reply-To: [email protected]
Frames: Pretty close! I'm almost sold on divs and ready to say I'm done developing with frames. Can you dynamically set the height of that div so that it adjusts to overall window height? On my machine the scroller goes down below the bottom of my screen, so I have to "scroll to scroll" That, of course, doesn't happen with frames.
Frames were so nice because they allowed for automatic fractional window amounts. Is this possible easily with divs, or do you have to hard code all the coordinates. "position:absolute" can be difficult.
[I know this is a bit off the focus of the Jmol list, so I'm cross-posting to ChemWebDev.]
Bob Hanson
Craig Martin Univ of Mass
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107 Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057 mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users
J. Philip Bays Professor of Chemistry Science Hall 158 Saint Mary's College Notre Dame IN 46556 (574) 284-4663
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107 Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057 mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

