Javascript image swap for many(36) images - Could someone help clean up this script

They have: 268 posts

Joined: May 1999

I have a page for my scout troop that is going to show awards the boys have earned. The script I has works but I would like to use OnClick instead of OnMouseOver so that you can scroll to the bottom of the page. The problem I have is when I change OnMouseOver to OnClick and get rid of the OnMouseOut the images don't revert to the original image. Can anyone show me how to achieve the same effect using arrays or a general reset command that can be used in place of the OnMouseOut?

The url is discoverynet.com/~tekguy/Troop214/Honor.shtml

Thanks in advance.
BTW I know the text is not readable. The images will eventually be colored beads that represent the awards. Just needed placeholders.

----------
My goal in life is found in Phillipians 4:8-9

My goal in life is found in Phillipians 4:8-9
shoutingrock.org/troop214

They have: 5,633 posts

Joined: Jan 1970

Try using onMouseUp instead of onMouseOut. This may solve your problem.

----------
[email protected]
vegas.com.au/~jasper

They have: 268 posts

Joined: May 1999

Nope, no help there. Thanks for trying. What I would like is a script that the command could be something like this.

OnMouseClick highlight(1,2,4,6,8,10); revert(3,5,7,9)

The numbers would be the number of the images. Please take another look and see if any of you can help me.

Thanks Jim

----------
My goal in life is found in Phillipians 4:8-9

My goal in life is found in Phillipians 4:8-9
shoutingrock.org/troop214

They have: 268 posts

Joined: May 1999

Surely I haven't stumped you. No-one wants to take a crack at this? Have I come up with something that is to hard for you to do?

----------
My goal in life is found in Phillipians 4:8-9

My goal in life is found in Phillipians 4:8-9
shoutingrock.org/troop214

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Did you get the email I sent you? I suggested some timeouts, I just haven't tried testing it yet.. Smiling

----------
Page Resource: http://www.pageresource.com
JavaScript City: http://www.javascriptcity.com

They have: 268 posts

Joined: May 1999

I tried the timeouts but couldn't decide what amount of time to use. Also if you clicked on another name before the timeout you still had the problem. What I have decided to do if I can figure it out is to have the onMousedown clear all the images and the onMouseup set the new ones.

----------
My goal in life is found in Phillipians 4:8-9

My goal in life is found in Phillipians 4:8-9
shoutingrock.org/troop214

They have: 268 posts

Joined: May 1999

Hey guys,

Just wanted to let you know that I have a page that works. Now if I could shorten the script. Please take another look and see if you have any ideas.
discoverynet.com/~tekguy/Troop214/Honor.shtml

lloydhass: Thanks for the onmouseup and onmousedown tip. Made a huge difference.

----------
My goal in life is found in Phillipians 4:8-9

My goal in life is found in Phillipians 4:8-9
shoutingrock.org/troop214

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.