I have a web page with lots of small images on it. In a typical scenario user clicks on image and expects it to change with a new image.
Requirements:
- When user clicks on image, it should be immediately known to a controller in an Ajax way.
- Some strings should be passed to a controller when user clicks on image.
- Controller does its job and returns another image (which replaces old one).
- Along with image controller returns a couple of extra strings (such as completion status).
- Web page updates old image with new one and also updates other parts with these new strings.
- Number of images on a page varies but potentially it can be a couple of dozens.
Question: What Ajax technique should be used here? I'm quite new to Ajax and don't feel solid with patterns. Should it be Json or something else?
Any code example would be very very welcome and helpful.
Thank you.