I think that ajaxForm already adds a submit handler to the form you are
adding it to...
So i think this is doubling up.
$('input', $form).change(function(){
$form.submit();
});
On Wed, Dec 17, 2008 at 6:33 AM, Jan Limpens <[email protected]> wrote:
>
> And this does work:
>
> $(document).ready(function(){
> $form = $('#filter-form');
> $('input', $form).change(function(){
> $form.ajaxSubmit({
> dataType: 'json',
> success: function(){},
> target: "#layout-child-output"
> });
> });
> })
>
> strange, though
>
> On Tue, Dec 16, 2008 at 3:27 PM, Jan Limpens <[email protected]>
> wrote:
> > Must be some bug in ajaxForm, I guess.
> >
> > if I change
> > $('input', $form).change(function(){
> > $form.submit();
> > });
> >
> > to
> > $('input', $form).change(function(){
> > alert('peng');
> > });
> >
> > it fires once only, otherwise I get the exponential behavior. My guess
> > is, that ajaxForm.submit() somehow touches the inputs and triggers the
> > change event recursively. But that is just my impression...
> >
> > On Tue, Dec 16, 2008 at 3:12 PM, Jan Limpens <[email protected]>
> wrote:
> >> No, unfortunately... but I may be able to put something up...
> >>
> >> On Tue, Dec 16, 2008 at 3:05 PM, Eric Hobo Garside <[email protected]>
> wrote:
> >>>
> >>> Do you have a live environment where this is hosted, or at least the
> >>> code for the page to test it locally? Looks like it should be working
> >>> fine, at face value.
> >>>
> >>> On Dec 16, 11:55 am, "Jan Limpens" <[email protected]> wrote:
> >>>> Hi guys,
> >>>>
> >>>> I have this piece of innocent looking code:
> >>>>
> >>>> <script>
> >>>> $(document).ready(function(){
> >>>> $form = $('#filter-form');
> >>>> $form.ajaxForm({
> >>>> //dataType: 'json',
> >>>> success: function(){
> >>>> alert("peng");
> >>>> },
> >>>> target: "#layout-child-output"
> >>>> });
> >>>> $('input', $form).change(function(){
> >>>> $form.submit();
> >>>> });})
> >>>>
> >>>> </script>
> >>>>
> >>>> If I check one checkbox, I get one submit, for 2 2, however for 3 4,
> >>>> for 4 16, and so on until the server crashes.
> >>>>
> >>>> Any idea what is wrong here?
> >>>> --
> >>>> Jan
> >>
> >>
> >>
> >> --
> >> Jan
> >>
> >
> >
> >
> > --
> > Jan
> >
>
>
>
> --
> Jan
>