Here is a code snippet to change image1 to image2 when the user clicks on image1. It uses a JavaScript function so the change is immediate (once the images have been loaded in the client's cache of course). The program uses 2 images already in the public directory so it shoul run on any RB server.

' Using a JS function to change an image on click
' (Many thanx to Brent Thorn :-)
html "<script type='text/JavaScript'>"
        html "function flip(img)
           var imgname='"+img2$+"';
html "</script>"
html "<img src="""; img1$;""" width=24 height=23 onclick='flip(this)'>"