Bob, I know we discussed this before. Initially I thought it was a good idea. However, on further consideration and paying attention to how a web site using these generated pages would be managed I decided that I like the separate scripts. Here's why: 1) The maintenance on the site doesn't change because we still have to have some extra files like the images and jmolPopin.js. 2) I find that when hand editing things it is not that hard to mess up things you don't intend to. By keeping the script separate from the html the only thing that can get damaged is the script. For most people reading html to find small errors is difficult. 3) I am also still worried about web editors messing things up. The web export function is primarily aimed at those who will not hand code html. DreamWeaver and such sometimes add comments, which might mess things up. 4) I also think that for most scientists and students it would be a better use of their time to learn Jmol scripting than html. If the Jmol scripts are separate from the html then people can deal with scripts and html separately.
Jonathan On Aug 31, 2008, at 11:49 AM, Robert Hanson wrote: > we should be saving the scripts as part of the HTML file in <!-- -- > > comments, then loading them from that. The whole .spt business > should go. > > In the .js file we need: > > function getScript(name) { > var tag = "-- JMOL SCRIPT " + name + " --"; > var script = document.body.innerHTML.split(tag)[1]; > if (!script) { > alert("missing embedded Jmol script " + tag) > return "" > } > return script; > } > > Then in the HTML we put: > > <!-- JMOL SCRIPT someScriptName -- > the script goes here > -- JMOL SCRIPT someScriptName --> > > This of course would just be inserted into the template as > something like > > @embeddedScripts@ > > possibly because wer are using XML we might want to use > > <![CDATA[ -- JMOL SCRIPT someScriptName -- > > > > -- JMOL SCRIPT someScriptName -- ]]> > > instead. > Bob > > > On Sun, Aug 31, 2008 at 11:33 AM, Jonathan Gutow <[EMAIL PROTECTED]> > wrote: > Bob, > We're almost there. We've now got it set up so that users > can have > special characters in the button text. However, this leads to > special characters in the file names. This does not work when the > script processing engine is used to load and queue a script through > commands like "script Herrÿez.spt" (used by jmolButton). My > inclination is to replace all special characters with an underline in > the javaname that is used to generate script and image names. My > question is does simple replace support a "not" kind of structure or > should I use the java replace system which will allow me to deny all > characters that are not 0..1a..zA..Z? The only problem I really see > is that this might become an issue in non-western languages. > > Jonathan > On Aug 31, 2008, at 9:58 AM, Robert Hanson wrote: > > > great to have that resolved. Thanks, Jonathan and Angel. > > > > On Sat, Aug 30, 2008 at 1:20 PM, Jonathan Gutow <[EMAIL PROTECTED]> > > wrote: > > > > On Aug 30, 2008, at 12:31 PM, Angel Herráez wrote: > > > > > Jonathan, to finish clarifying this, attached is the file set I > > > just generated. Please add the > > > applet files into the same folder and see how they look in your > Mac > > > and your server. > > > I hope we can shed some light on this. > > > > > > One of my colleagues, in Malaga University, also uses Mac, and we > > > keep having trouble > > > with accents. > > > > > > The following section of this message contains a file attachment > > > prepared for transmission using the Internet MIME message format. > > > If you are using Pegasus Mail, or any other MIME-compliant system, > > > you should be able to save it or view it from within your mailer. > > > If you cannot, please ask your system administrator for > assistance. > > > > > > ---- File information ----------- > > > File: jmoltoweb14.zip > > > Date: 30 Aug 2008, 19:29 > > > Size: 203515 bytes. > > > Type: ZIP-archive<jmoltoweb14.zip> > > > > I tried the pages generated on Angel's machine, with the version > that > > generates bad pages on my machine. They work fine. The problem > > appears to be the encoding on the Mac vs how the web browsers > > interpret things. On the Mac the Java put in 87(hex) for á while on > > Windows java puts in E1 (hex) which is the proper unicode. It > > appears we are fighting a bug in the java on MacOS. > > > > An interesting note is that the proper unicode characters always > > appear correctly in my generic mac text editor and the mac mail > > program. I wonder if this is a legacy issue that hasn't been > cleared > > up yet. > > > > Bob's fix should solve this problem. Thanks. > > > > Jonathan > > Dr. Jonathan H. Gutow > > Chemistry Department [EMAIL PROTECTED] > > UW-Oshkosh Office: > > 920-424-1326 > > 800 Algoma Boulevard FAX: > 920-424-2042 > > Oshkosh, WI 54901 > > http://www.uwosh.edu/faculty_staff/gutow/ > > > > > > > > > > > > > ---------------------------------------------------------------------- > > --- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > Build the coolest Linux based applications with Moblin SDK & win > > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > > the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Jmol-developers mailing list > > Jmol-developers@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jmol-developers > > > > > > > > -- > > Robert M. Hanson > > Professor of Chemistry > > St. Olaf College > > Northfield, MN > > http://www.stolaf.edu/people/hansonr > > > > > > If nature does not answer first what we want, > > it is better to take what answer we get. > > > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > > > ---------------------------------------------------------------------- > > --- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > Build the coolest Linux based applications with Moblin SDK & win > > great prizes > > Grand prize is a trip for two to an Open Source event anywhere in > > the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Jmol-developers mailing list > > Jmol-developers@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jmol-developers > > Dr. Jonathan H. Gutow > Chemistry Department [EMAIL PROTECTED] > UW-Oshkosh Office: > 920-424-1326 > 800 Algoma Boulevard FAX:920-424-2042 > Oshkosh, WI 54901 > http://www.uwosh.edu/faculty_staff/gutow/ > > > > > > ---------------------------------------------------------------------- > --- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Jmol-developers mailing list > Jmol-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-developers > > > > -- > Robert M. Hanson > Professor of Chemistry > St. Olaf College > Northfield, MN > http://www.stolaf.edu/people/hansonr > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > ---------------------------------------------------------------------- > --- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Jmol-developers mailing list > Jmol-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-developers Dr. Jonathan H. Gutow Chemistry Department [EMAIL PROTECTED] UW-Oshkosh Office:920-424-1326 800 Algoma Boulevard FAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/faculty_staff/gutow/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers