Selectable parameter

User 143c71d535

11-09-2007 18:38:59

When using the applet, what exactly will setting the selectable parameter to false do? In my case, I am displaying a single molecule on a web page via HTML applet tag. I was hoping the selectable parameter would prevent the user from doing anything except seeing the 2-D molecule (i.e. static 'image'). I would like to prevent the user from 'right-clicking' or doing anything at all (on select HTML pages). Is there a way to do what I want? Thanks!

ChemAxon 7c2d26e5cf

11-09-2007 20:43:00

I think you need editable, detachable, importEnabled and draggable parameters with the below settings:
Code:
mview_param("editable",0);


mview_param("detachable","false");


mview_param("importEnabled","false");


mview_param("draggable","false");



Although you can not restrict all input events and the whole popup menu from the users but it is the most what you can do now (deny mouse move events / detaching windows / paste).


If you really need only the molecule picture, use a real image instead of applet. With Marvin Beans API on the server side, you can create image and display it on the web page (on-the-fly). See our JSP examples: Image Generation Using Marvin Beans


By the way, in the next major release (5.0), the menu (also the popup menu) will be fully customizable.