how to get image source in ajax call using java script?

Sorry, I'm not quite sure what you mean by the image source. Do you mean the URI of the image?

So, let's say you have:

<img id="my-image" src="image.gif">

Then you can use jQuery to do something like:

variable = $('#my-image').attr('src');
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.