APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

HowTo use Checkboxes post and replies

Return to the HowTo use Checkboxes thread
Login to post to this thread

How to use Checkboxes
Klaus-Dieter Grueninger
2 Posts

Hi there,

I am currently working on an optics project and I wonder how I can use
Checkboxes to determine the visibility on an element.

I assume it is quite simple, but I have no clue how to do it.

Can you name any EJSS in Javascript where this has been done so I can see
how to implement it?



Replies to How to use Checkboxes

Re: How to use Checkboxes -
lookang Avatar
222 Posts

Yes it is easy.

Set the drawing element visible option to a variable say showWhatever  to make objects appear and disappear when the Boolean showWhatever is control in the checkbox.


Post edited June 4, 2017 at 7:00 PM EST.

OSP@SG blog
OSP@SG Digital Library

OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book