In reply to my long message Miguel wrote:

Please clarify/enumerate the ways in which the examples were non-compliant

Only two.
1. As you realized later in your message, the <form> tag needs an 'action'.
2. The <script> tag alone in any version of html is incorrect.
I must stress that the commonly used version that Bob quotes
<script language="javascript">
is only valid as transitional. 'language' has been deprecated for the last six years and can (and should) be ditched forthwith without any harm. The correct html 4.01 strict form is the one I gave in my message and the one I use without problem on all my sites:
<script type="text/javascript">
see <http://www.w3.org/TR/html401/interact/scripts.html>
(to quote:
language = cdata [CI]
Deprecated. This attribute specifies the scripting language of the contents of this element. Its value is an identifier for the language, but since these identifiers are not standard, this attribute has been deprecated in favor of type.)

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

These are they.

If you think there is a way we can work around these things then please
let me know so we can discuss it.

There is nothing that can be done about them. It's just a little easier for me validating a page with the applet tags hidden in the javascript because I can use a 'strict' dtd rather than the custom dtd I otherwise use which is a modification of 'transitional' and thus doesn't pick up practices I'm trying to avoid.

As a reminder, things must be enclosed in <form> tags because of Safari.

I'd forgotten or never knew. But surely Safari is correct here. Where in HTML do checkboxes exist outside forms?

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.

Yes, I am aware of this, and I appreciate it can be useful (assuming the browser doesn't ignore it), but my particular concern was with styling the surrounding html rather than the checkboxes themselves.There was nothing in the page to indicate that the script could be split to accomodate placing in separate divs. Of course in the case of checkboxes it is good that you provide this, as it would be difficult for the user to assign a css style otherwise. However intervening html is clearly not the concern of the js (ok your simple <br> function is helpful to people who are not html savy) - the user can handle this himself. I just wonder what would happen if you had two applets on a page (not a concern of mine, but I know it is of interest to others). How would the controls be identified with a particular applet unless in the same script block?

David



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