On Wed, April 13, 2005 1:51 pm, Joost Van Durme said:
> Hi,
>
> I want to use html checkboxes to toggle eg. ribbons on or off. So, when
> checked, ribbons are on, when unchecked, ribbons are off.
> I'm writing the html page in plain html after loading the applet with
> <applet>...</applet>. This is the most convenient way for me since I will
> have to generate pages on the fly.
I have a viewer that also generates its pages on the fly (via perl cgi)
and I use this RSM (really simple-minded) html for two checkboxes, one too
turn labels on/off and one to switch between ball&stick and wireframe:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<caption><font size="4" color="#00ff00">MolID<br>
</font></caption>
<tr>
<td align="center" width="490">
<script type="text/javascript"><!--
jmolInitialize("../jmol10");
jmolSetAppletColor("black");
jmolApplet(480,"load /xray/3Dmodels/MolID.pdb");
//-->
</script>
</td>
<td align="left"><font color="#00ff00">Rotation - left mouse button<br>
Zoom - shift + left button<br>
Translate - shift-doubleclick left button & hold<br>
Menu - right click in graphics window </font></td>
</tr>
</table>
<table width="490" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td align="center">
<script type="text/javascript"><!--
jmolCheckbox("select not hydrogen; label %a; font label 14 sansserif bold;
select all", "label off", "<font color='#00ff00'>Show atom
labels</font>");
//-->
</script>
</td><td> </td>
<td align="center"><font color="#00ff00">
<script type="text/javascript"><!--
jmolCheckbox("select all; cpk off; wireframe 0.1; select not bonded;
spacefill 10%", "select all; cpk 20%; wireframe .15", "<font
color='#00ff00'>Wireframe</font>");
//-->
</script>
</font></td>
</tr>
</table>
-------------------------------------------------------
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