this would be a radio button and send doesn't make sense here.
this.getParent('form').send(); // for an XHR submit
// or
this.getParent('form').submit(); // like pressing a submit button in
the form
On Jan 9, 2009, at 17:21, Zaphod Beeblebrox wrote:
Without wanting to lose your time.
I would like my form is submitted when the person click on my radio
button. but the form wasn't submit.
window.addEvent('domready', function(){
$$('.radio_button').addEvent('click',function(event) {
this.send();
})
});
On 9 jan, 17:10, Zaphod Beeblebrox <[email protected]> wrote:
thank you very much for your answer, that works very well. Yes I know
for Fx. I understood that it's different but I just wanted to say I
tried everything :-(
On 9 jan, 15:16, Michal <[email protected]> wrote:
I think your issue is that 'answer_submit_class' is a CSS selector
for
a html *tag* answer_submit_class, and one doesn't exist. What I
think
you're looking for is '.answer_submit_class' (note the dot at the
beginning).
Just for reference, I think that last example you gave will never
work... I think there is some confusion between Fx.Elements and
elements there.
Michal.
On Jan 9, 12:58 pm, Zaphod Beeblebrox <[email protected]> wrote:
Sorry if my question in doesn't good place.
I try too add event to collection of input, this code work
perfectly
for one
var dialog_msg = function(){ alert('Foo'); }
$('answer_submit_id').addEvent('click', dialog_msg);
but when i try this, doen't work :-(
$$('answer_submit_class').addEvent('click', dialog_msg);
or this
$$('answer_submit_class').each(function(stuffButton) {
stuffButton.addEvent('click',function(){
alert('Yep');
});
});
or this
var myFx = new Fx.Elements($$
('input.answer_submit_class')).set({
'click': function(){
alert('click');
}
});
and many other ...
in other word, i can't do apply an event to collection of
element. and
i nothing find in dochttp://mootools.net/docs/
Anybody for help me ?!
Thanks.
--
Jan - MooTools comitter
twitter/blog: http://kassens.net