[Jmol-users] passing a variable from JavaScript to JmolScript

2011-03-25 Thread Yingjie Lin
Dear Jmolers, I have a variable X in JavaScript, and I am looking for a way to pass it back to Jmol. I did my homework and found that save javascript:functionCall() might be what I need. However, I couldn't figure out how this should be used in Jmol. For example, where to place this

Re: [Jmol-users] passing a variable from JavaScript to JmolScript

2011-03-25 Thread Angel Herráez
Yingjie, I think it's easier I have a variable X in JavaScript, and I am looking for a way to pass it back to Jmol. How about jmolScript(var myJmolVar = + myJSvar) that would pass the value to the 'myJmolVar' variable in JmolScript. Or do you need something more complicated that just

Re: [Jmol-users] passing a variable from JavaScript to JmolScript

2011-03-25 Thread Yingjie Lin
Hi Angel How about jmolScript(var myJmolVar = + myJSvar) that would pass the value to the 'myJmolVar' variable in JmolScript. Or do you need something more complicated that just getting the variable? This is great! It's exactly what I want and much simpler than I thought. Thanks and have