Bob,

I don't think that is the problem. It's an asp.net server side insertion. It defaults to "load ../models/2-chlorobutane_(R).txt; "

It's in the page to pick up query strings expressed as jme files. We use these to send email links that load models directly. With our default, the jmolApplet reads:

jmolApplet([300, 300], 'load ../models/2-chlorobutane_(R).txt;javascript "jmolInit()";');

The above is what the server sends to the browser, and it is what appears in the page source. I should have sent this translation originally. In the above, jmolInit runs

My jmolInit() is pretty involved:

1) An immediate jmolScript() call.
2) A JavaScript setTimeout() that makes a jmolGetPropertyAsArray() call and another jmolScript call.

Maybe that jmolInit() function is getting me into trouble.

Otis

Otis Rothenberger
chemagic.com


On 10/17/2010 2:52 PM, Robert Hanson wrote:
Otis, What's with the <%=....%> in the middle of a Jmol script command? I don't see what you are after there. I would just have:

jmolApplet([300, 300], 'javascript "jmolInit()";');

Bob

On Sat, Oct 16, 2010 at 9:40 PM, Otis Rothenberger <[email protected] <mailto:[email protected]>> wrote:

    Bob,

    I'll try to gather more applet lock information per your note.

    On the load issue, could the following be my problem - remember
    that this error occurs just occasionally? My Jmol applet set is as
    follows:

    <script type="text/javascript" language="JavaScript">
                                        jmolApplet([300, 300],
    '<%=jmolLoadStr %>javascript "jmolInit()";');
    </script>

    The server code, jmolLoadStr simply delivers the file path.The
    jmolInit() is a JavaScript function that does call jmolScript().
    I've been operating under the assumption that the above approach
    is the equivalent of an "on applet load" event - i.e. the terminal
    JavaScript does not get executed until the applet is loaded. Wrong
    assumption?? Better way to do this??


    Otis

    Otis Rothenberger
    chemagic.com  <http://chemagic.com>


    On 10/15/2010 1:00 PM, Robert Hanson wrote:


    On Fri, Oct 15, 2010 at 9:08 AM, Otis Rothenberger
    <[email protected] <mailto:[email protected]>> wrote:

         Bob,

        I realize that random errors are hard to analyze without specific
        circumstances, but I thought that you might have some "likely
        suspect"
        thoughts on the following two that pop up from time to time:

        1) On an applet load, a Jmol.js for: "if (applet)
        applet.script(script);" (line 410 in 12.1.14_dev) -
        applet.script(script) is not a function.


    This means you are sending a script prior to the applet being
    completely loaded -- which occurs AFTER the page loads. Probably
    you have some JavaScript running that doesn't wait for a callback
    from the applet before it runs or is not included in the
    JmolApplet call. A simple way to avoid this is to have a message
    callback that triggers whatever script you are trying to do, or
    if it is a user event, and the user is just pressing the button
    too soon, that might do it.


        2) An applet freeze (lock) after sequential model kit actions.


    Check the Java console and see if there is an error trace there.
    Send it to me if there is. If you issue

    set debug
    set debugscript

    early on, you could send me the whole Java console report after
    this happens, and we could track down the sequence of commands
    that did it.

    Bob

        There are no obvious cause and affect actions. When these
        problems
        occur, they are not reproducible by simply repeating the
        previous actions.

        Otis

        --
        Otis Rothenberger
        chemagic.com <http://chemagic.com>





    
------------------------------------------------------------------------------
    Download new Adobe(R) Flash(R) Builder(TM) 4
    The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
    Flex(R) Builder(TM)) enable the development of rich applications
    that run
    across multiple browsers and platforms. Download your free trials
    today!
    http://p.sf.net/sfu/adobe-dev2dev
    _______________________________________________
    Jmol-users mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/jmol-users




--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


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


------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev


_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to