View Full Version : Image Swap, with URL change, and back again?

02-24-2003, 07:36 PM
Hello. I know there are several image threads out here, but I am not finding a discussion about how to swap an image back and forth.

Here is my goal. I have a program that displays X number of messages depending on user rights. I have a 'check box' image for the users to click to indicate that they have completed the task. This is saved to the db, so the images show as checked the next time they come back.

I need a script that would
1) Switch an image to checked and then back again if it is reclicked.
2) Change the url to my check or uncheck procedure.

I have a counter that assigns numerical unique names to each message image. I have found basic image swap functions, but I can't get it to change back on reclick, and I can't figure out how to change the url.

Could I have the javascript function call a PL/SQL procedure passing in a variable? Maybe that would solve my url issue, but I am not sure if I could do that. Could a table be updated from an onClick event? I am just trying to brainstorm here.

Any help would be much appreciated.