I think you need to have a look over the Ajax docs again:
http://docs.jquery.com/Ajax

I'm not sure what you're expecting to have happen. What do you mean
"returns an array to an HTML template"? Your $.ajax(...) call will get
the contents of get_photos?vehicle_id=... and pass it as a parameter
to your success callback function where it's your responsibility to
deal with it (i.e., add it to the document). Maybe you want to do:

$.ajax({
...,
success: function(data) { $('#showPhotos').append(data); }
});

--Erik

On 8/27/07, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> Hi Michael,
>
> Thanks for the reply.
>
> Don't think that did the trick unfortunately.  I moved the code out into
> <head></head> with the following:
>
>
>     <script type="text/javascript">
>     $(function() {
>         $('#showPhotos').show("slow", function() {
>
>         $.ajax({
>                 data:     "vehicle_id="+<?= $this->uri->segment(4); ?>,
>                 timeout:  10000,
>                 type:     'POST',
>                 url:      "get_photos",
>                 error:    function()     { alert("showPhotos was NOT
> successfully loaded.. Contact the system administrator."); },
>                 success:  function()      { alert("showPhotos was
> successfully loaded."); },
>               }); // end $.ajax
>         }); // end show()
>     });
>     </script>
>
> get_photos returns an array to an HTML template.
>
> Not sure exactly what the issue is still unfortunately.
>
>
>
> On 8/27/07, Steve Finkelstein <[EMAIL PROTECTED] > wrote:
> > Yes, I know this is my fault. Where though, I'm clueless. If someone
> > can help me recover from my fumble, I'd appreciate it.
> >
> > I have a div that resembles the following:
> >
> > <div id="showPhotos">
> > <script type="text/javascript">
> >                 $('#showPhotos').load('get_photos',
> {vehicle_id: <?=$this->uri-
> > >segment(4);?>});
> > </script>
> > </div>
> >
> > I'm sending vehicle_id to a serverside PHP script. I then return an
> > Object into a separate HTML template which should get injected into
> > that div that takes the Object and echos out some parameters.  When I
> > use firebug to debug this, Response says: Loading ...
> >
> > If I need to post more information to help debug this, I'd love to
> > provide it. I'm sort of stuck thinking of alternative ways to approach
> > this.
> >
> > Thanks for the assistance. :-)
> >
> > - sf
> >
> >
>
>

Reply via email to