Jochen Ismer wrote:
> Hello Everybody,
> i want to have a textfield in which the user can type the number of
> the amino acid he wants to choose. My code was something like that,
> but it doesn't work:
>
> <SCRIPT >
> function test() {
> var x = document.myform.eingabe.value
> jmolscript( 'select x;')
> }
> </SCRIPT>
>
> <input type="text" name = "eingabe" >
> <input type="button" value="select AS"
> onClick="test ()">
>
I think the problem is variable substitution. In the part
"jmolscript('select x;')" 'x' will not be substituted by the value of
variable 'x'.
If you would use "jmolscript('select ' + x + ';')" instead, the variable
substitution should be done.
Regards,
Rolf
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users