Re: [Jmol-users] problem in firefox

2008-08-29 Thread Bob Hanson
Must use 11.6.rc11 Sent from my iPhone On Aug 29, 2008, at 10:14 AM, Jeff Hansen <[EMAIL PROTECTED]> wrote: I spoke too soon. var x = jmolEvaluate('getProperty("auxiliaryInfo.zeroPoint")') isn't working for me. It returns an error message about the getProperty command. ***

Re: [Jmol-users] problem in firefox

2008-08-29 Thread Jeff Hansen
I spoke too soon. var x = jmolEvaluate('getProperty("auxiliaryInfo.zeroPoint")') isn't working for me. It returns an error message about the getProperty command. *** Jeff Hansen Department of Chemistry and Biochemistry DePauw University 602 S

Re: [Jmol-users] problem in firefox

2008-08-29 Thread Jeff Hansen
I guess I really didn't need the jmolGetStatus() I just wanted some way to check that the applet was being loaded and I could communicate with it. I'll just forget using that. Getting the zeroPoint wasn't too bad. This is what I did. var _dataInfo = jmolGetPropertyAsArray("auxiliar

Re: [Jmol-users] problem in firefox

2008-08-29 Thread Robert Hanson
mosty I think you will find that the jmolGetStatus() business won't be helpful. I'm probably the only who ever used that. It was an early attempt to get around callbacks, and I can't think of any good reason to use it now. Try something else, like the following: alert(jmolGetPropertyAsString("au

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Jeff Hansen
Thanks Bob. If gas prices weren't so high and my family wouldn't miss me too much I would take you up on the offer. Of course jmolScriptWait didn't break anything, just my failed attempts to use it broke something. I tried your second alternative (callbacks are still a mystery to me alth

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Robert Hanson
Jeff, why don't you come over to St. Olaf and I'll show you how this works! :) Seriously, hang in there. You are trying to do a lot all at once, and you will catch on. This is precisely what this list is for. Just keep at it. "jmolScriptWait" would not "break" anything. jmolScriptWait should only

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Jeff Hansen
I tried jmolScriptWait but couldn't get it to not break the load command. *** Jeff Hansen Department of Chemistry and Biochemistry DePauw University 602 S. College Ave. Greencastle, IN 46135 [EMAIL PROTECTED] **

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Jeff Hansen
Thanks. New it had to be something simple like that. For some reason I needed the \" earlier and it was still there. *** Jeff Hansen Department of Chemistry and Biochemistry DePauw University 602 S. College Ave. Greencastle, IN 46135 [EMAIL PROTECT

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Jeff Hansen
Sorry I wasn't clear about this, but the applet corresponding to result1 is loaded when the page loads. I'll try jmolScriptWait to see if that does anything for the result2. f *** Jeff Hansen Department of Chemistry and Biochemistry DePauw Unive

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Angel Herráez
On 28 Aug 2008 at 15:59, Jeff Hansen wrote: > Additionally, the alert(result1) (see code below) displays undefined > in the alert box and alert(result2) displays a blank alert box. So > I'm wondering what is going on with that. I would say that with result1 you are trying to read from the ap

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Robert Hanson
remove the \" around the load command. It's just: this.loadString = "load ../Jmol/jmol/Models/" + molecule; On Thu, Aug 28, 2008 at 2:59 PM, Jeff Hansen <[EMAIL PROTECTED]> wrote: > Thanks for your help Angel. This is getting me very nearly there. To > recap. I am trying to create a

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Jeff Hansen
Thanks for your help Angel. This is getting me very nearly there. To recap. I am trying to create a web page in which a div element is created and a new Jmol applet is displayed in that new div. Your suggestion to take a look at the Jmol homepage was very helpful. That is essentially w

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Angel Herráez
My previous message lacked a link (I clicked Send too soon :) ): > Have you checked out the method used in Jmol homepage? I'm not sure if that's > what you > are after. A similar solution is what I once called "pop-in" method for > inserting Jmol applet > upon user request. This is used in Jmo

Re: [Jmol-users] problem in firefox

2008-08-28 Thread Angel Herráez
Hi Jeff Not sure after the flurry of messages if you have solved your problem. On 27 Aug 2008 at 16:21, Jeff Hansen wrote: > Unfortunately both off these do the same thing which is to write the > function used to create the Jmol applet object into the into the div as text. That may be due, as

Re: [Jmol-users] problem in firefox

2008-08-27 Thread Robert Hanson
My experience is the "appendChild" is overkill for what you generally need. Just make sure you have jmolSetDocument(0) and then the "applet" you get from var x = jmolApplet(.) can be inserted into any div. HOWEVER, as I recall there are problems with some browsers not being able to communic

Re: [Jmol-users] problem in firefox

2008-08-27 Thread Jeff Hansen
Believe me I've been doing plenty of that, but I also have been finding trial and error to be very instructive too. I did take a look at your divs.js file. I don't yet understand all of it. I tried your divFind and divWrite functions and I'm pretty sure I'm understanding what they do. U

Re: [Jmol-users] problem in firefox

2008-08-27 Thread Robert Hanson
>> I'm working towards my own at this point and I'm afraid looking at yours will just prevent my learning how to do it myself. Shame! NEVER say that! The way to learn this is by adapting anything you can find. That's the great thing about JavaScript. Learn how these code fragments work by testing

Re: [Jmol-users] problem in firefox

2008-08-27 Thread Jeff Hansen
Thanks. Bob. Using document.getElementById('jmolText'); worked. Thanks for sharing your .js file as well. I'll probably take a look at it at some point. I'm working towards my own at this point and I'm afraid looking at yours will just prevent my learning how to do it myself. ***

Re: [Jmol-users] problem in firefox

2008-08-27 Thread Rolf Huehne
Jeff, it looks as if there would be some kind of timing problem. With the version I got from your URL it sometimes works with Firefox 2.0.0.16 on Linux and sometimes not. === function appletReady() { var _dataInfo = jmolGetPropertyAsArray("auxiliaryInfo"); var

Re: [Jmol-users] problem in firefox

2008-08-27 Thread Jeff Hansen
Dean, Yeah, I thought of that and tried it, but that didn't work either. In that case Firebug reports that getElementById is not defined. So it seems for some reason Firefox isn't recognizing the textarea's id. Incidentally, I get a similar error when I try the same with the textDiv di

Re: [Jmol-users] problem in firefox

2008-08-27 Thread Robert Hanson
Right -- "name" attribute is quite problematical. In some browsers "id" is accessible as "name", but that's not acceptable. And in some browser versions the name of an element in a form is under the form name rather than the document. Always use "id" and, as Dean points out, then access it only us

Re: [Jmol-users] problem in firefox

2008-08-27 Thread Angel Herráez
Hi Jeff The key must be in the dump() function, I'd say You are trying to write an array into a text area. I guess different browsers may take that differently, unless you force the array to become a string. Or, how about calling jmolText fully? document.getElementById("jmolText").value = dump(

Re: [Jmol-users] problem in firefox

2008-08-27 Thread Dean Johnston
Jeff, No apologies needed. Giving an id to a does not create a Javascript object automatically (at least in Firefox). You will have to use something like: var myText = document.getElementById('jmolText'); and then say myText.value = dump(_dataInfo); It's interesting that it *does* work in