> Only two.
> 1. As you realized later in your message, the <form> tag needs an
> 'action'.

Yes.

> 2. The <script> tag alone in any version of html is incorrect.

Note that the <script> tag alone is valid if the default has been set for
the page using either a meta tag in the header:

  <META http-equiv="Content-Script-Type" content="text/javascript">


> I must stress that the commonly used version that Bob quotes
> <script language="javascript"> is only valid as transitional.

That is correct. "language" is deprecated.

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

Actually, the Safari behavior is incorrect.

Once events were provided to execute scripts, it became valid to have UI
controls that were outside of forms.

w3c HTML 4.01:

-------

17.2.1 Control types

[snip]

The elements used to create controls generally appear inside a FORM
element, but may also appear outside of a FORM element declaration when
they are used to build user interfaces. This is discussed in the section
on intrinsic events.

[snip]

--------

The section on 'intrinsic events' talks about onload, onclick, etc.


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

OK

> There was nothing in the page to indicate that the script
> could be split to accomodate placing in separate divs.

I am not aware of any problems that could be caused by putting things in
separate divs.

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

There is explicit support in Jmol.js to support multiple applets.

Controls are associated with applets in the order that they are statically
encountered in the html file. That is, once jmolApplet (or
jmolAppletInline) is called, then all controls found after that point in
the html file are associated with that applet. This is independent of
divs, tables, or other layout mechanisms that may place things elsewhere
on the screen.

If one wishes to have more control than this, then Jmol.js provides the
function

  jmolSetTarget({targetSuffix})

wheret {targetSuffix} is the suffix that you supplied when you called
jmolApplet.

Probably the documentation on this needs to be clarified (see below), but
in general I think that the usage is pretty straightforward and I think
that it works.


Miguel

----

http://jmol.sourceforge.net/jslibrary/#jmolSetTarget

jmolSetTarget

    jmolSetTarget(targetSuffix)

    Do not use this unless you are displaying multiple applets at the same
time and your Jmol.js UI controls are not sequentially following their
associated jmolApplet invocations.

    If you understood the previous sentence then you can probably figure
out what jmolSetTarget does.



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