So you are trying to use jQuery's ".load()" functionality with an
actual image (i assume that your php sets the content type to image/
jpeg, image/gif, etc and writes out the actual binary image data) ?

that's not going to work, as the ".load()" loads the result of the
Ajax call into the innerHtml of DOM object

I don't know though, you're talking "same function" but have posted
about three different functions so far, $.ajax, .load, and your custom
function....  but bottom line is, the $.ajax call which ultimately
gets called wouldn't be a replacement for <img src="your.php" />,
*unless* you wanted to use data url vales as image sources (like:
http://www.websiteoptimization.com/speed/tweak/inline-images/), but
the problem with that, like almost all cool ideas like that link
shows, is it doesn't work with IE

On Jan 6, 10:48 am, Mean Mike <mcgra...@gmail.com> wrote:
> basically all ajax calls go through
>
> $.ajax({.....});
>
> I made a function that gets passed all the parameters that I want in
> the ajax call
>
> oddly enough i can't get load to work right either i just get Array
> returned
>
> On Jan 6, 10:33 am, MorningZ <morni...@gmail.com> wrote:
>
> > > I want all my ajax calls to run through the same ajax function
>
> > What "same" ajax function?
>
> > On Jan 6, 10:29 am, Mean Mike <mcgra...@gmail.com> wrote:
>
> > > ok so I figured out that you can put in image in your page using .load
> > > (imageloader.php) but is there a way to load an image using regular
> > > ajax call .
>
> > > alittle more explanation of what I'm trying to do
>
> > > in my php I use imagejpeg function  which outputs the image using gd
> > > great!
>
> > > and in my html i use to just go <img src="imageloader.php?
> > > dir=directory&name=filename" /> and that worked except now I don't
> > > want to pass that info in the query string I want to post the info AND
> > > I want all my ajax calls to run through the same ajax function which
> > > is why I don't want to use .load
>
> > > any thoughts or suggestions
>
> > > mean mike

Reply via email to