On Tue, Jun 1, 2010 at 9:03 AM, Otis Rothenberger <osrot...@chemagic.com>wrote:

>  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.
>
>
jmolApplet(300, "load xxxx;javascript 'loadDone()' ")


Sorry -- my error -- in this case you need double quotes or no quotes, not
single quotes (because it is in the class of commands such as echo and
message. That should read:

jmolApplet(300, 'load xxxx;javascript "loadDone()" ')





> 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.
>

AJAX would be perfect. Just have the applet issue the above loadDone()
function, and then have the AJAX just return the data as text from IU to a
JavaScript function. I know, it's tricky to do this right with different
browsers....



>
> 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.
>

Sounds retro.


>
> 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.
>

right - switch those quotes.


>
> 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>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 Rothenbergerchemagic.com
>
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> 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
------------------------------------------------------------------------------

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

Reply via email to