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 :-)
'
'********************************************************************
 
img1$="../public/runbutton.png"
img2$="../public/savebutton.png"
 
html "<script type='text/JavaScript'>"
        html "function flip(img)
        {
           var imgname='"+img2$+"';
           img.src=imgname;
        }"
html "</script>"
 
 
html "<img src="""; img1$;""" width=24 height=23 onclick='flip(this)'>"
 
wait