One of the first things i do when debugging a javascript problem is to open the page in FireFox using Firebug. I’ll have a quick look for any javascript errors.
If there are no errors, I next try to diagnose whether my javascript event listener is being invoked at all.
In your case, i would change the first of three scripts to:
Event.observe($('#{activePageBean.clientIds['toggle-one']}'), "click", function() {
alert("here");
});
Most likely the names of the controls don’t match what you have in the javascript, but that is just a guess.
Lastly, you could try to execute some of the javascript directly in firebug to see if you have valid references to the controls. On my server (after having built the sample out) that looks like:
CAF.model('jsfwmp6777:defaultForm:hideablePanel1').hide();
Regards,
–mark
#MWS-CAF-Task-Engine#webMethods-BPMS#webMethods