David, I agree that this is needed. To date I have not utilized Jmol.js to much extent specifically because of the hidden "gotchas" in there. (Nonetheless, I fully recognize the importance of recommending a standard programming interface to the applet, which Jmol.js provides.)

I would recommend in all examples being explicit as to the name of the Jmol applet referenced --- in other words, NOT ignoring optional parameters. If more experienced users want to ignore the parameters, all the power to them, but by having those applets explicitly parameterized and user-named, the user (and reader) has more direct, usable information, and the example will more likely work when on a page with more than one applet present. (And learns more about the flexibilities available.)

Similarly, all forms should be named, and all divs should have "id" tags. I know this is not necessary, but I believe that (a) well thought-out names and ids provide handles for understanding the code and (b) the presence of named elements makes for simpler integration into larger projects.

Users should only have to rely on referencing "document.applets[0]" or "document.forms[0]" when absolutely necessary.

Just my 2 cents.

Bob Hanson


David Leader wrote:

<clipped>

<body>
{html block with start of div of fixed width enclosing whole}
<div class="left">

<form action="">
<script type="text/javascript">
        jmolInitialize("../jmol");
        jmolApplet(size, load molecule script)
</script>
</form>

<div...>
Instruction stuff
</div>
 <!-- end of left div-->

<div class="right">
<form action="">
'start of table with headings and styles'
<tr><td>
<script type="text/javascript">
        jmolCheckbox("script", "")
</script>
<td>'my own information instead of a label</td></tr>
....
</table>
</form>
 </div> <!-- end of right div-->

<div class="footer">claret bar (hic)</div>

</body>

--
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



-------------------------------------------------------
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

Reply via email to