Bob,

You may have told me before, but I forget. How do you signal JavaScript that the Jmol applet is loaded? I've tried putting a Jmol javascript command into the Jmol load script, but MSIE seems to ignore this.

AJAX would be nice, but I can't get past the cross domain security issue with the unsigned applet. The signed applet scares many users, so I'm using my server to get past this issue. Unfortunately, this means each SMILES to mofile is a new load on my page.

Getting the returned molfile into into a JavaSript variable is a bit convoluted with ASP.NET, but it's doable. Normally this is not a problem, but the line feeds create a problem in the case of the molfile. I have to go to a hidden field and then transfer to a JavaScript variable.

Anyway, with the above stage set, I just need to be able to hold the JavaScript load to Jmol off until the applet is loaded.

Otis




On 6/1/2010 9:24 AM, Robert Hanson wrote:
tisk tisk! Never use setTimeout to do the Jmol load. Use a call FROM Jmol indicating it has loaded to trigger your AJAX call or whatever.

On Mon, May 31, 2010 at 6:02 PM, Otis Rothenberger <osrot...@chemagic.com <mailto:osrot...@chemagic.com>> wrote:

    Bob,

    Right now I pass it from a server variable to a hidden field on
    the page load. This is followed by an onLoad call to a TimeOut()
    load into Jmol. I suspect that timing is the issue. I have to find
    a better way to do it. AJAX per your subsequent email may be the
    answer. If I understand AJAX, I will not have to do a new page load.

    I'm also having problems with triple bonds (#) in the query
    string. I guess I need to try sending escaped text.

    Otis


--
Otis Rothenberger
chemagic.com

------------------------------------------------------------------------------

_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to