Hi Rolf,
thanks for the help but it also doesn't work. I get an Error Message: object
expected for the line.
Jochen

2007/3/16, Rolf Huehne <[EMAIL PROTECTED]>:

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

-------------------------------------------------------------------------
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

Reply via email to