Bob,
If I do a page load with:
<body>
<span id="jmol1">
<script type="text/javascript" language="JavaScript">
jmolApplet(300, 'load ../models/methane.mol;javascript
"alert(1234)";')
</script>
</span>
</body>
All is well in MSIE. If I do the console test, all is well in MSIE
However, the console on my loaded applet, which obviously has a problem,
chokes on exactly the same console entry in MSIE: javascript "alert(1234)"
The exact error is:
0 atoms selected
14 atoms selected
script ERROR: invalid argument
----
evalintermediatevaluetoreturn = eval >> ( << "!!_jmol.noEval" )
Clearly, MSIE does not like something on my page. The applet behaves
properly in all other respects in MSIE. I did not know that a page
problem could screw up the applet console.
It sure looks like your assertion is correct. Do you have any idea why
MSIE and the Jmol console could be giving a hoot about 0 atoms selected
and 14 atoms selected on a simple javascript alert command??
Otis
On 6/14/2010 1:38 PM, Otis Rothenberger wrote:
Bob,
I ran into this problem when I needed to hold off on an inline load of
Indiana University SMILES to molfile data until after an applet was
loaded with a starter Xe model. The Xe is a quick load and it looks
pretty sitting there while a "please wait" message echos on the
screen. Once this Xe is loaded (applet and the model data), I can do
business with the IU data. The Jmol javascript command in the load
script worked, but not in MSIE.
In trying to track this down, I used all of the following in the console:
1) javascript alert("nuts")
2) javascript 'alert("nuts")'
3) javascript "alert('nuts')"
Item 2 does not work. For items 1 and 3, Firefox and Chrome say, "nuts."
MSIE (8.0.6001...) says:
evalintermediatevaluetoreturn = eval >> ( << "!!_jmol.noEval" )
Perhaps I have a syntax error in my script, but with the above result,
I called it quits on MSIE. Let me go back and check this out. Maybe
the console wasn't the way to test this. Also, I have not checked this
recently. The above information was in an email to you a while back,
and I was using an older version of Jmol - the HOLD version, I think!
I'll get back to you after lunch.
Otis
On 6/14/2010 12:18 PM, Robert Hanson wrote:
Hmm...
On Mon, Jun 14, 2010 at 10:42 AM, Otis Rothenberger
<[email protected] <mailto:[email protected]>> wrote:
Jonathan,
3) MSIE (see below)
MSIE seems to completely ignore the Jmol Javascript command. The only
way I've found around this is to use browser sniffing and write a
clumsy
Timeout routine to call the JmolLoaded() function in MSIE
I think we have talked about this, but I'm forgetting the details. I
have not seen this in any of my own production work, and I do not
believe it is true. Can you give us an example, Otis?
You are saying that the following does not work in MSIE?
jmolApplet(300,'javascript "alert(1234)";')
?
You sure? Please test that, Otis.
Bob
Otis
On 6/14/2010 9:36 AM, Jonathan Gutow wrote:
> A question for you javascript mavens.
>
> I'm trying to help the SageMath people with their Jmol
interface. I need to get some information about directories
through the messageCallBack mechanism and am running into issues
with the order applets are loaded. When a page with many applets
is loading the load order is unpredictable and I am finding that
the message callback information seems to get garbled as to which
applet the message comes from (maybe the messages are
overlapping). I have no way of knowing ahead of time how many
applets are on a page as they are created on the fly by the server.
>
> Anyway. I think my problem would be solved if I could simply
run a function that queries each applet in sequence _after_ they
have all loaded, rather than having each applet send a message
callback as it finishes loading. So I'm looking for a way to
know that the page is ready for me to do this.
>
> Any ideas?
>
> Thanks,
> Jonathan
> Dr. Jonathan H. Gutow
> Chemistry Department [email protected] <mailto:[email protected]>
> UW-Oshkosh Office:
920-424-1326
> 800 Algoma Boulevard
FAX:920-424-2042
> Oshkosh, WI 54901
> http://www.uwosh.edu/facstaff/gutow
>
>
>
------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Jmol-users mailing list
> [email protected]
<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Otis Rothenberger
chemagic.com <http://chemagic.com>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
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
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users
--
Otis Rothenberger
chemagic.com
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users
--
Otis Rothenberger
chemagic.com
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users