Adriano,

Bob is correct that you need to prepend each call with a "parent." reference, or with a more direct reference to the frame in which the Applet was created (frames can be id'd by name or number).

If you are trying to use Jmol.js, you'll run into problems because it is not written to call across frames. In other words, even though you might get the Jmol.js function called correctly by pre-pending "parent.", when the Jmol.js function calls the Applet, it will still be calling from the wrong frame.

I ran into this problem converting a CHIME project that I had. Since everything that I read says we should not use frames anymore, I used this as a prompt to drop the frames altogether. In order to achieve the same type of positioning I could achieve with frames, I had to learn to use positioning with <DIV> and/or <SPAN> tags. Google to your favorite JavaScript site to learn more.

You can see my "frame-less" implementation at:
http://tm.chem.umass.edu/martin/Courses/BioStruct/JmolShell/WingedHelixII

Craig Martin

Message: 2
To: [EMAIL PROTECTED]
From: adriano ceccarelli <[EMAIL PROTECTED]>
Date: Thu, 7 Oct 2004 17:16:33 +0200
Subject: [Jmol-users] crossing frames

Hi all,
I can't manage to use links in one frame to execute scripts by the
applet in the other frame, same window. Is it possible at all, and, in
case, how?

Many thanks

Adriano

================

Message: 5
Date: Thu, 07 Oct 2004 13:32:58 -0500
From: Bob Hanson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [Jmol-users] crossing frames

this is no problem. I do this all the time. See, for example,

http://www.stolaf.edu/people/hansonr/jmol/inline/

It would help if you provide a reference to a page you find doesn't work.
You  need a "name" parameter in the frame tag:


<frame name=FrameMolecule ....>

then in JavaScript you can say:

parent.FrameMolecule.document.open()
parent.FrameMolecule.document.write()

etc.

If that is what you are doing already, send the URL to the page.

Bob Hanson




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Jmol-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to