looking at this more closely, I'm wondering if in this application you might
want to use radio buttons. In that case you need to specify the value of the
radio, since the names will be the same. Maybe something like:
<body onload=document.info.reset()>
<script language=javascript>function myfunction(n,c){alert(n+" "+c)}</script>
<form name=info>
<input name=btn1 type=checkbox onclick="myfunction(name,checked)">
<input name=btn2 type=checkbox onclick="myfunction(name,checked)">
<input name=btn type=radio value=3 onclick="myfunction(name+value,checked)">
<input name=btn type=radio value=4 onclick="myfunction(name+value,checked)">
<input name=btn type=radio value=5 onclick="myfunction(name+value,checked)">
<input name=btn type=radio value=6 onclick="myfunction(name+value,checked)">
</form>
</body>
Joost Van Durme wrote:
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.
Right now I use a javascript to execute jmol scripts from a website listed a
Wiki. The functionality looks something like this:
----------
<script LANGUAGE="JavaScript" TYPE="text/javascript">
function scriptMe(command){
document.jmol.script(command);
}
</script>
.
.
.
.
<input type ="button" name="color" value="By chain" onClick="scriptMe('select *; color
chain;')"/>
-------------
Now, can I use checkboxes in the same way? If not in the same way ... another
way? ;-)
Thanks in advance!
Joost
-------------------------------------------------------
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
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
-------------------------------------------------------
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