Ashok -- Getting going with anything on the web does have a learning curve.
A few tips. I am sure you already know many of these, but others may not.

1. Look in the JSmol distribution for examples. Study them to see how they
work. Especially supersimple.htm, supersimple2.htm, jsmol.htm, resize.htm,
simple.htm, and simple2.htm. jsmetest.htm and jsmetest2.htm are also
interesting.

2. Start with one of those and modify it just as much as you need.
Personally, I would start with jsmol.htm, because it has links that allow
quick looking at the JavaScript console that resides "behind" the applet.
But maybe supersimple.htm or simple2.htm.

3. If you are using a PC with Firefox, life is easier because you can go
into about:config and set


*security.fileuri.strict_origin_policy;false*
at least while you work. This allows you to just unzip jsmol.htm and run
your tests on your local machine from that directory, working fast without
doing any site uploads or having to install a local web server.

The batch file I use to test chrome locally on a PC is this:


*"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
--allow-file-access-from-files --disable-web-security*
The first of these flags allows you to load the necessary .js files from
your local drive and also open local files. The second allows you to read
binary local files such as .gz and PNGJ files.

4. Use plenty of alert(...) and/or document.title=... commands

5. Become familiar with the browser's Java console.

6. If you use

   System.out.println("test message...")

you can send output to JSmol's "JavaScript Console" (accessible via the
popup menu) and check it later to see what it says without unnecessarily
stopping with alerts.

7. In order to use JSmol on a web site you need to have all the files your
page accesses present. The basic recommendation is to just upload all of
the jsmol directory to your server so that you have them there. At least
the j2s and idioma directories.

If you want to streamline that, all you have to do is run your page through
its paces and then look in the browser's console to see what .js files were
involved and put those on your web site. It's probably very few. (And I
recently did some adjustments in this, so the next release will require
even fewer if PDB files are involved.) Don't forget to add the idioma
directory, as that adds translations into different languages of the popup
menu and console.

8. Send to this list links to pages that don't work so we can take a look.
Generally it would take someone on this list just a moment to spot a
problem.


Bob
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to