> The reasons for fearing the answer may be no were the non-compliant > nature of the form and script mark-up in the examples given, the fact > that rudimentary css and break methods were provided in the > javascript, and the possibility that both applet call and buttons had > to be in the same script block.
Please clarify/enumerate the ways in which the examples were non-compliant. I am aware that there is no default language specified for the scripting language, but I do not understand what you mean by the other issues you have identified. > Happily - at least if you have only > one applet on a page - this turns out not to be true. An example of > my success (which incidentally illustrates my problem of wanting to > script the controls so that they could reset the state of each other) > is to be found at: > > <http://doolittle.ibls.gla.ac.uk/leader/jmolTests/jmolTest1.html> > > which is the same design I use at: > > <http://doolittle.ibls.gla.ac.uk:9006/david/servlet/ProteinMotifDB> > > Comments on this page: > 1. The DTD as html 4.01 strict is a bit of a cheat. Although the > source code validates, the page generated will have applet tags that > wouldn't have validated. However one point of validation is to pick > up errors which may throw browsers other than the one one is > developing in, so it is useful that this validates strict. It would be helpful for you to enumerate the problems that you have identified with the code that is generated by the jmolApplet() function. The ones that I am aware of are: - the APPLET tag itself is deprecated - 'mayscript' is not listed as a valid applet attribute Neverthelss, as a practical matter I believe that these ares of 'nonconformance' are desirable. I do not believe that we can use object instead of APPLET because older browsers will choke on it. 'mayscript' is necessary ... if people want to ever have any chance of having callbacks or event notification. If you think there is a way we can work around these things then please let me know so we can discuss it. [snip] > General approach > The general approach is to have: > {html block} > > {form tag open } > {scipt block with applet call} > {form tag close} > > {html block} > > {form tag open} > {script block with button calls} > {form tag close} > > {html block} > As long as you close the script tags and enclose in a form the pages > work ok (at least on OSX Safari and Mozilla - I haven't tested on IE6 > windows) As a reminder, things must be enclosed in <form> tags because of Safari. No other browser requires it. (well, maybe Konqueror ... but it is not supported because Java applet support is broken in other ways) > More specific description > In the page indicated I wish to have text spanning the whole page (in > practice a pop-up), the applet in a left column (left div) below with > instructions below it, the buttons in a right column (right div), > and then below these two a bottom div (here just a claret-coloured > bar) spanning the whole. the body layout is in essence: > > <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> > > Comments on more specific description > 1. The second checkbox argument is just "" so I can supply the > description where I wish. > 2. I have marked up the script tags correctly as type="text/javascript". I recommend that we consider using the META tag to set the default scripting language. That way it is less verbose in the body because we do not have to repeat the type every time there is a script tag. <META http-equiv="Content-Script-Type" content="type"> > 3. I have supplied a redundant action="" for the open form tags so > that the page validates. I now see that 'action' is a required attribute for form tags ... so I guess this is a necessary evil. --- One thing that you may want to consider regarding css ... Note that it is possible to set explicit css classes for the HTML objects generated by Jmol.js functions. Cascading Style Sheet support jmolSetAppletCssClass jmolSetButtonCssClass jmolSetCheckboxCssClass jmolSetRadioCssClass jmolSetLinkCssClass jmolSetMenuCssClass For example, one can call jmolSetCheckboxCssClass("myPrettyCheckbox"); Later, one can call jmolCheckbox("spacefill on", "spacefill off", "Big Atoms!"); and the HTML code that is generated by will include class="myPrettyCheckbox" The idea is to give people a finer level of css control over the applets/buttons/menus/etc that are generated by Jmol.js Miguel ------------------------------------------------------- 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

