On 08/16/2013 05:54 PM, Amjad Farooq wrote:
> Hi guys,
>
> I am trying to use javascripting below to prompt for selecting a RESIDUE in
> a given CHAIN within a PDB file but it is not working:
>
> ******************************************************************************
> <script type="text/javascript">
> function residue()
> {
> var a = prompt("Enter Residue")
> var b = prompt("Enter chain")
> if ((!a) && (!b))return
> jmolScript("select "+a":"+b)
> }
> </script>
> <button style='width:150' onclick="residue()">Select Residue</button>
> ******************************************************************************
>
>
> What am I doing wrong?!
>
What exactly doesn't work?
Have you checked if 'a' and 'b' are set correctly?

If you build the Jmol command before using it you could directly check 
if it is correct with an alert:

   var command = "select "+a":"+b;
   alert("command='" + command + "'");

Regards,
Rolf
-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax:     +49 3641 65 6210
E-Mail:  [email protected]
Website: http://www.fli-leibniz.de

           Scientific Director: Prof. Dr. K. Lenhard Rudolph
        Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to