Paul,
Thank you very much. This works exactly the way I wanted it to be. You made
my day!
Amjad



On Wed, Aug 7, 2013 at 6:50 PM, Pillot Paul <paul.pil...@ac-orleans-tours.fr
> wrote:

> Hi Amjad,
> you should not create a new Jmol instance for each script sent.
> When you want to send a script to the applet, you should use the
> javascript method jmolScript("your commands go there");
> Then, your enterPDB() function should read :
>
> *
> function enterPDB() { var xxxx = prompt("Enter PDB code")
>  if (!xxxx)return
>  jmolScript("load ="+xxxx)}*
>
> Paul
>
> Le 07/08/13, *Amjad Farooq * <amja...@gmail.com> a écrit :
>
> Hi everyone,
>
> I need help with how to prevent the JmolApplet from switching to a new
> page upon entering a PDB file. Please bear with me for a moment:
>
> (1) Log onto the page that I am working on:
> http://labs.med.miami.edu/farooq/jmol/
>
> (2) Click on "Enter PDB Code (Method 1)"
> Type the "=1shc" code and select "Open" in the prompt window. You will see
> that the PDB file opens up in the JmolApplet right above using Method 1.
> This is perfect and I am happy with it. However, I would like a simpler and
> neater way to open up PDB files into the JmolApplet (see below).
>
> (3) Click on "Enter PDB Code (Method 2)"
> Type the "=1shc" code and select "OK" in the prompt window. You will see
> that the PDB opens up in the JmolApplet on a different page!! It takes me
> to a new page. This is very annoying to say the least. I would like Method
> 2 to open up the PDB file without changing the page in a manner akin to
> Method 1 shown above.
>
> (4) Please see my HTML code that I am using below and let me know what
> changes I need to make:
>
>
> **************************************************************************************************************
>
> *
> <html><title>My JMol Page</title><head>
> <script type="text/java_script" src="Jmol.js"></script><script 
> type="text/java_script">
> jmolInitialize(".","JmolAppletSigned.jar")</script></head><body><center><H2>My
>  JMol Page</H2><script>jmolHtml("<div id=pdb>")jmolApplet(400,"load 
> =1HZM")jmolBr()jmolHtml("</div>")//jmolSetDocument(0)</script><BR><BR>
> <script type="text/java_script">
> _jmol.buttonCssText="style='width:250'"jmolButton("load ?=1shc","Enter PDB 
> Code (Method 1)")</script><BR><BR>
> <script type="text/java_script">
> function enterPDB() { var xxxx = prompt("Enter PDB code") if (!xxxx)return 
> code = xxxx var s = jmolApplet(400,"load ="+code) 
> document.getElementById("pdb").innerHTML = s;}</script><button 
> style='width:250' onclick="enterPDB()">Enter PDB Code (Method 
> 2)</button><BR><BR></center></body></html>
> *
>
> ***************************************************************************************
> Thank you so much for your time and help.
>
> With due regards,
> Amjad Farooq
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to