• Hi all. We have had reports of member's signatures being edited to include malicious content. You can rest assured this wasn't done by staff and we can find no indication that the forums themselves have been compromised.

    However, remember to keep your passwords secure. If you use similar logins on multiple sites, people and even bots may be able to access your account.

    We always recommend using unique passwords and enable two-factor authentication if possible. Make sure you are secure.
  • Be sure to join the discussion on our discord at: Discord.gg/serebii
  • If you're still waiting for the e-mail, be sure to check your junk/spam e-mail folders

onClick=imagechange, How?

Reyzadren

Dark trainer
Yes, I've asked a similar question regarding bgColor. Now, I want image changing. I'm just too lazy to read up scripts and interpret them, but I know it's different from bgColor changing :p

Say I have 20 small pictures and 1 big picture below them. By clicking one of the small pictures, the big picture will show the true size of the small picture, which is in truth, big. This creates sort of a thumbnail effect of some sort. I know this has something to do with arrays and functions, but I don't exactly how to put them together.


Also, to take this opportunity, I believe I asked this some time ago, but I got no replies at all, probably because the details I gave were too..descriptive. I would like to ask again, how do you stop Windows XP from automatically refreshing my computer, more like desktop, every 1-2 hours or so?
2 questions aren't worth 2 threads after all.
 
A

Argoxoz Crucificus

Guest
Well, for the thumbnail effect, you'll want to drop this into your <head>:

Hopefully you understand basic HTML

Code:
<script>
function imgChange(imgurl) {
document.bigimg.src = imgurl
}
</script>

Then for your body

Now, for the big picture:

Code:
<img src="default picture url" height="What height you want the big pic to be" width="what width you want it to be" name="bigimg" />

Then, for your thumbnails:
Code:
<a onClick="imgChange('Same URL as the thumbnail this a tag is surrounding')"><img src="picture URL" height="What height you want the thumnail pic to be" width="what width you want it to be" /></a>

Repeat the thumbnail as often as you need to, and slot them into <div>s or slot <br />s in between or whatever.
 
Top