|
|
|
|
![]() ![]() |
Aug 7 2006, 08:15 PM
Post
#1
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 537 Joined: 19-May 06 From: Leeds, UK Member No.: 23,963 |
Edit: Haha, nevermind....I've had it fixed now
Slide show So i'm trying to make my own slideshow, see above. I have the pictures showing depending what "num" equals...Well, the code's here: CODE <script TYPE="text/javascript"> <!-- var num = 1; var pic = "pic.gif"; switch (num) { default: document.write("<img src='pic1.gif'>"); break; case 1: document.write("<img src='pic1.gif'>"); break; case 2: document.write("<img src='pic2.gif'>"); break; case 3: document.write("<img src='pic3.gif'>"); break; } function next() { num ++; alert("Done!"); } --> </SCRIPT> <br> <script TYPE="text/javascript"> <!-- document.write(num) --> </SCRIPT> <br><br> <form> <input type="button" onclick="next()" value="Next"> </form> (That's all in the body section, btw.) But when I click "Next", the alert comes up, but num doesn't increase....I've tried using "num + 1" "num = num + 1" "num += 1" etc, etc, etc, but none of them work. So my question is...How can I get it to work? This post has been edited by Dagoth Nereviar: Aug 7 2006, 09:37 PM |
|
|
|
Aug 8 2006, 05:07 AM
Post
#2
|
|
|
Desperately seeking "any key" to continue... ![]() Group: Admin Posts: 3,481 Joined: 23-April 05 From: Trap17 storage box Member No.: 6,042 |
It would have been nice to know how you fixed it. Topic closed.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 8th October 2008 - 10:21 AM |