Do you have any other ajax options set outside the code you've
provided?

It would be helpful if you try this on a demo page and isolate the
issue. It sounds like something else may be interfering with it.

On Feb 27, 9:46 am, Dan <tribaldr...@gmail.com> wrote:
> Hi Ricardo,
>
> I've been trying so many different combinations to get this to work
> that I forgot the callback function on the version I posted. I've
> tried it with the callback and even copy/pasted your code and still no
> luck. I'm completely baffled why a simple echo statement isn't getting
> returned but other code on the same page works.
>
> Dan
>
> On Feb 27, 1:28 pm, ricardobeat <ricardob...@gmail.com> wrote:
>
> > Where are you expecting to collect the response? Are you using a
> > callback?
>
> > function check_out_image(image_id) {
> >    $.post('ajax/checkout_image', {imageid: image_id}, function(resp){
> >          alert(resp);
> >   });
>
> > }
>
> > On Feb 27, 2:41 pm, Dan <tribaldr...@gmail.com> wrote:
>
> > > I'm using jquery 1.3.2 and trying to send some data using $.post to a
> > > PHP script. For some reason the response is not being returned and
> > > Firebug is reporting an error on line 3633 of jquery.
>
> > > function check_out_image(image_id) {
> > >    $.post('ajax/checkout_image', {imageid: image_id} );
>
> > > }
>
> > > A very simply function that POST's an image ID to my PHP script. The
> > > PHP script is getting run and updating a MySQL database so I know it's
> > > calling the right function and working but the echo response never
> > > makes it back.
>
> > > For reference line 3633 of jquery 1.3.2 is the xhr.send(s.data) line
> > > below:
>
> > >         try {
> > >                 xhr.send(s.data);
> > >         } catch(e) {
> > >                 jQuery.handleError(s, xhr, null, e);
> > >         }
>
> > > For testing purposes I changed my PHP function to a simple echo "foo"
> > > statement with nothing else in it and it still doesn't get returned.
> > > Any ideas on why the response wouldn't get sent back?
>
> > > Thanks,
> > > Dan
>
>

Reply via email to