-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Miguel and Bob,

Thank you very much for your answer that help me to do what I wanted.  
The result is at
  http://www.scmbb.ulb.ac.be/~jean/ModMol/4proteines.html

NB I used the form.reset() but couldn't implement the function for  
reseting a specific CheckBox, but I have to admit that this was my  
first piece of JavaScript code.

Best regards,

Jean


> Date: Fri, 26 Aug 2005 10:24:07 -0400 (EDT)
> Subject: Re: [Jmol-users] How to reset a jmolCheckbox
> From: "Miguel" <[EMAIL PROTECTED]>
>
>
> You need to write the JavaScript to do this yourself.
>
> When you create the checkbox control it is possible for you to pass  
> in an=
>
> identifier (the last parameter) that will be used as the 'name' and  
> 'id'
> of the control.
>
> function jmolCheckbox(scriptWhenChecked, scriptWhenUnchecked,
>                       labelHtml, isChecked, id) =7B
>
> (If you do not pass in a parameter, then the default id/name is
> 'jmolCheckbox0', 'jmolCheckbox1', ..., etc.)
>
> The checkbox control associated with this id is a normal JavaScript
> checkbox control.
>
> When events occur in your UI, you can call
> getElementById(=22yourCheckBoxControlID=22), and query/modify the  
> state o=
> f the
> control to make the state presented to the user consistent.
>
>
> Sorry ... there is no easy way.
>
> ** 1 minute later **
>
> Actually, that is not completely true. This is a generic problem.  
> It is
> *possible* that there are user interface libraries written in  
> JavaScript
> that provide a general framework to make it easier to do this. I am  
> not
> aware of such a thing, but maybe someone else is.
>
> (If a JavaScript and/or GUI guru wants to talk about building a more
> general (but very complex) mechanism to support this into Jmol.js then
> please post to jmol-developers=40lists.sf.net)
>
>
> Miguel


> Date: Fri, 26 Aug 2005 15:41:47 -0500
> From: Bob Hanson <[EMAIL PROTECTED]>
> Subject: Re: [Jmol-users] How to reset a jmolCheckbox
>
> Jean,
>
> Whatever button is touched to do the new molecule should also  
> execute the function
>
> document.formname.reset()
>
> where "formname" is the name of the form containing the radio buttons.
> This returns the form to whatever state it was in when the page was  
> loaded.
>
> -Bob Hanson
>
>
> -- 
> Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
> Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave.,  
> Northfield, MN 55057
> mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr

-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.1 (Build 2185)

iQA/AwUBQxQ1lLps3x1BL8wPEQKIXwCfZ+7YBXbF7nNve/Wl8kfimoLwA+EAn0BM
/iEw8sdjftV6XprQT0q1B8Cy
=bCRb
-----END PGP SIGNATURE-----


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to