David Leader wrote:
Two words of caution:
1. Using browser sniffing to write tags using js makes problems when new browsers come along. We've seen that in all the sites that assumed a browser was IE or NS. Not only will the Jmol js library have to be modified, but previous versions installed on the internet will be out of date. If new browsers still support the applet tag it won't matter, of course...

I agree. It would be better, for instance, for the code to detect the presence of window.ActiveXObject to understand to create the IE-type object instead of checking to see that navigator.appVersion includes "IE" or not. I know for some aspects you can't do this, especially with the strange Mac configurations that are out there, but as much as possible, it is the functionality, not the name, that should determine what choices are made for applet/object


2. This sort of thing may allow one to generate partial code that satisfies HTML4.01 or XHTML1.0 strict in appropriate browsers, but unless you also use javascript to generate the DTD line, that's is bound to be incorrect on some browsers. Not that it really matters, as browsers only take limited notice of the DTD (see my next posting).

Right. And you have to have your SERVER sending out the page as "application/xhtml+xml" type. AND, you have to require no use of Internet Explorer by your users (because IE does not and probably will not ever support XML).

I think the idea is that the code delivered by Jmol.js is "strict" in the sense that you can insert it where you like. As I have recently learned from Toby White, though HTML-4.01-strict, Jmol.js is not really XHTML1.0-strict. This is because a true XML-based browser will not allow ANY code writing like Jmol.js does. Still, the idea is that if you use Jmol.js and later want to incorporate it in an XML project, it won't be a huge switch if you ever actually needed Jmol.js in an XML project. Just a slightly different "XML-based" Jmol.js. (Toby is setting that up. Look for notes about "JmolX.js" in the future.)

Bob
--

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

"Imagination is more important than knowledge."  - Albert Einstein


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to