Do you want to see text dynamically added/removed from a page?
Pull up 'show-source' in an adjacent window.
(If you like, you can pull up javascript-tools (via
Chrome>Wrench or the Firefox extension "Firebug"),
and watch how the DOM changes.)
Click "here" on and off a couple times. Look at the javascript code
and see what it's doing.
Now click on "there" couple times.
It's calling a function (so it's more re-usable);
it's also changing the other button's checked attribute
in addition to its disabled.
GUI notice:
whether or not a checkbox is disabled
is orthogonal to whether it's selected.
If you ever disable a checkbox, think about whether or not
you also want to make ensure that it's not selected!
Note that the attribute for input tags is
called "disabled", and there is not
an attribute called "enabled".
(That one always gets me.)
In html (not javascript), when a page is first visited,
you can set the disabled
attribute
to either "disabled" or the empty string —
not to "true"/"false" or something reasonable like that.
Now try the yes/no/maybe selections.
Look at what the javascript code does,
look at the original html for the p "dynoPara",
and keep in mind that multi-lines of javascript code
are unwieldy in tag-attributes, and are better put into functions
inside a script tag
(even if it's a specialized, ad hoc function that's only
called from one place).
Be sure to read and understand the alternate explanation
in the show-source comments, inside the p "dynoPara".