ok i did that and i have only one alert box so the event is fired
once. So what is that fires two same ajax get request?

On Apr 8, 1:00 am, James <james.gp....@gmail.com> wrote:
> Try adding an alert or console.log in your change event (not inside
> your ajax success callback) to debug whether the change event is
> actually being called once or twice.
>
> On Apr 7, 12:23 pm, Skyblaze <marcomenozz...@gmail.com> wrote:
>
> > I have no other id with that name and also with firebug suspended it
> > is the same.....always the same ajax/get request...two identical ajax
> > get request one after the other
>
> > On Apr 7, 8:31 pm, "Rick Faircloth" <r...@whitestonemedia.com> wrote:
>
> > > Make sure you don't have another id called #comprensori_id.
> > > I had some code left over from experimentation on a page that
> > > I failed to clear off and every time a certain ajax function ran,
> > > it did so twice!
>
> > > Rick
>
> > > -----Original Message-----
> > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> > > Behalf Of Skyblaze
> > > Sent: Tuesday, April 07, 2009 12:31 PM
> > > To: jQuery (English)
> > > Subject: [jQuery] Jquery makes two ajax requests in one!!
>
> > > I have a strange problem. I have to do an ajax request after a select
> > > box changes (change event) so i have the following code:
>
> > > $('#comprensori_id').change(function() {
> > >                         var comprensorio_id = $(this).val();
> > >                         $.ajax({
> > >                                    type: "GET",
> > >                                    url: "",
> > >                                    data: "comprensorio_id=" +
> > > comprensorio_id,
> > >                                    success: function(data, msg){
> > >                                 $('#comuni_id').empty();
> > >                                 $('#comuni_id').append(data);
> > >                                    }
> > >                                  });
> > >                 });
>
> > > the problem is that when i change the select box selection my browser
> > > makes two consecutives same ajax request and i can't figure out
> > > why...this is very strange

Reply via email to