1. How checkbox is related to clicks on radio buttons?
2. bindAsEventListener(this) isn't needed - bind(this) is enough.
3. Handler in Element#on retrieves clicked element as second argument,
no need to find it via var elm = e.findElement();
4. elm.getValue() for checkbox will return true or false - case 'athlete'
has
no sense - is this OK?
this.__z__chkClicksthis = this.form.on('click','input[type=checkbox]',
this.__chkClicks.bind(this));
__chkClicks: function(e, elm) {
this.form.select('div.container').invoke('hide');
this.form.select('input[type=checkbox]').without(elm).invoke('setValue',
false);
var chk_val = elm.getValue();
var show_layer = $F(elm) ? 'div.true_container' : 'div.false_container';
this.form.down(show_layer).show();
switch(chk_val) {
case 'athlete':
var input = $('qf_athlete').show().down('input');
input.setValue(_msoC.msouser.name);
this.__qf.Search(input.getValue());
break;
}
},
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/prototype-scriptaculous/-/aawca9SMor4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.