jmolRadioGroup takes an additional parameter designed to address exactly
this problem.
The second optional parameter is called separatorHtml. This HTML is output
between the buttons of the radio group. You can use it for additional
spacing, or to stack vertically, whatever you want.
Using your example, we can stack vertically by saying:
jmolRadioGroup([
["spacefill off", "off"],
["spacefill 70", "70"],
["spacefill 20%", "20%", "checked"],
["spacefill 50%", "50%"],
["spacefill 100%", "100%"]
],
"<br />"
);
This should output <br /> in the right spots.
(Note: I am using trailing / in order to be compliant with newer HTML/XML
standards. But, in order to retain compatibility with very old browsers,
you need to have a space between the br and the /)
Full documentation for the Jmol.js library is at:
http://www.jmol.org/jslibrary
Description of jmolRadioGroup is below.
Miguel
----------
jmolRadioGroup
jmolRadioGroup(arrayOfRadioButtons, {separatorHtml}, {groupName})
Used to put up a group of mutually-exclusive radio buttons.
arrayOfRadioButtons is usually specified using the _javascript_ square
brackets [ entryA, entryB, ... ] notation. Each entry is generally
another array which contains a script, a label, and an optional
isChecked flag. If an entry is a single string instead of an array,
then that string is used for both the script and the label.
separatorHtml is used to specify HTML code that should be placed after
each radio button. For example, to put the radio buttons on separate
lines you should pass in "<br>" as the actual parameter. If
separatorHtml is not specified it defaults to "<nbsp; "
groupName will be used as the common HTML name for all radio buttons
in the group. It will default to jmolRadioGroup0, jmolRadioGroup1,
etc.
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users
Thanks Miguel,