at 5.34p EDT on 2004 February 02 Monday Miguel Howard said:

> > using opener would help to use a JavaScript function in an JavaScript
> > generated window (I don't know any other way to define a JavaScript
> > function as content of a JavaScript written window).
> 
> We need to try one more time.
> 
> I still do not understand what you are trying to accomplish.
> 
for example: a Web page opens a new window with JMol instance in it.  the
msgcallback for that Jmol applet would call to a js function that exists in
the opener document, but not in the document that contains the Jmol applet
code.  similar situation for a multi-frame document, where Jmol in one frame
calls a js function that exists in another sibling frame (or the parent).



> Java cannot call a JavaScript function that is on another page. It *must*
> call a JavaScript function on the same window that contains the Java
> Applet.
> 
that sounds pretty final.  ;-)  I wonder:  what if the Java applet called a
function in the same window, but *that* function called one in a different
window?  that would work, no?



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
   "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";>
<html>
<head>
<!--
   <title>demo only!</title>

   <script type='text/javascript'>
      function show_picked(app,info,num) 
      {
         var picked = opener.show_picked(app,info,num);
         alert (picked);
      }
      
      function show_msgd(app,msg) 
      {
         var picked = opener.show_msgd(app,msg);
         alert (picked);
      }
   </script>
-->
</head>

<body>
<!--
   <applet 
      name="jmolapp" 
      code="JmolApplet" 
      archive="JmolApplet.jar" 
      width="90%" height="90%" 
      align="left" 
      mayscript="true">
      <param name="emulate" value="chime" />
      <param name="load" value="1d66.pdb" />
      <param name="bgcolor" value="#000000" />
      <param name="style" value="shaded" />
      <param name="wireframeRotation" value="false" />
      <param name="perspectiveDepth" value="false" />
      <param name="MessageCallBack" value="show_msgd" />
      <param name="PickCallBack" value="show_picked" />
      <param name="debugscript" value="true" />
   </applet>
-->
</body>
</html>



regards,

:tim

-- 
timothy driscoll
molvisions - molecular graphics & visualization
<http://www.molvisions.com/>
usa:north carolina:wake forest


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Jmol-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to