Popup window

User 1fdfc2ff04

27-05-2005 17:36:49

Is there an API call to the jmview applet to popup the marvinview window?

ChemAxon 7c2d26e5cf

27-05-2005 19:11:20

There is no method in the JMView applet to pop-up viewer windows programatically.


If you really need this feature, we can add it to the feature request list of Marvin.

User 1fdfc2ff04

27-05-2005 19:54:03

Tamas wrote:
There is no method in the JMView applet to pop-up viewer windows programatically.


If you really need this feature, we can add it to the feature request list of Marvin.
What I'm trying to do is pop up the view window with a structure loaded when an image rendering of that structure is clicked on a web page. My plan was to use a hidden applet on the web page to launch the window via the api call. If there's another/better way to do this please let me know.





Thank you.

ChemAxon 7c2d26e5cf

30-05-2005 20:16:50

OK, I add your request (viewer detaching) to the feature request list.


Until we implement it, I suggest you the following workaround:


Use a detached JMSketch applet instead of JMView.





Code:
<script language="JavaScript" src="marvin.js"></script>


<script language="JavaScript"><!--


function setMolecule(mol) {


    if(document.msketch != null) {


         document.msketch.setMol(mol,null);


    }


}


mview_name="msketch";


mview_begin(".",0,0);


mview_param("detach","show");


mview_param("viewonly", "true");


//--></script>



Use the above sketcher to display your structures. In the above example, the setMolecule function loads the structure into the sketcher. The sketcher window will detach when the applet is started. (Unfortunately, you can not control its opening programatically.)