Change-Image-OnClick

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.

code '******************************************************************* ' ' Using a JS function to change an image on click ' ' (Many thanx to Brent Thorn :-) ' '********************************************************************

img1$="../public/runbutton.png" img2$="../public/savebutton.png"

html "" html "function flip(img)       {           var imgname='"+img2$+"';           img.src=imgname;        }" html " "

html ""

wait code