Phil,

Yikes! Now you really have my attention.

void someFunction() is legit JavaScript syntax. It says, "execute the 
function, but don't return anything." Usually, this is used to keep an 
href, which acts (tries to load a url) on a return value from acting. 
But it's legit, so it will work in other contexts.

I think Bob's Nah refers to the JME. void JME.reset() will only work if 
your code in some other (maybe long forgotten component) is defined as: 
JME = document.getElementById("theNameYouUsedForJMEid")

At least, I think this is the case. OK, I'm willing to bet a salmon cake.

Otis

> Actually, I am on a Mac using Safari.   And I call a function because I want 
> to do some other stuff in setting up the problem.  The following is my 
> preliminary function script.  The first three lines are attempts to clear the 
> applet.   Only the void line works.   (I understand Bob's nah, but I do not 
> understand why the other two do not do the job.)  It is true on Mac FireFox 
> as well.   All three lines are obviously currently commented out.  But using 
> any one of them fails -- except the void reset
>
> function newProblem(){
>       //document.getElementById("JME").readMolecule("");
>       //void JME.reset();
>       //document.getElementById("JME").reset();
>       Problem = Problem + 1;
>       document.getElementById("IUPAC").innerHTML = Compound[Problem][0];
> }
>
>    

-- 
Otis Rothenberger
chemagic.com




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

_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to