home // Programming // Javascript
HTML/JAVASCRIPT TUTORIAL FOR DESIGNERS GALLERY SLIDE SHOW PART 2 1 ...
Source: www.mudpub.com
File Size: 107.9 KB
Page: 4 pages
Category: Programming
Last Download : 34 days 22 hours 59 minutes ago
Share this info:
Short Description: HTML/JAVASCRIPT TUTORIAL FOR DESIGNERS. GALLERY SLIDE SHOW PART 2. MUD(TM) - TAKASHI OKAMOTO. MUD@MUDPUB.COM. 1. Introduction. In part 1 of this example, ...
Content Inside: HTML/JAVASCRIPT TUTORIAL FOR DESIGNERS GALLERY SLIDE SHOW PART 2
MUD(TM) - TAKASHI OKAMOTO MUD@MUDPUB.COM
1. Introduction In part 1 of this example, we worked on an html section that enabled us to change the embedded image without having to load a new html file by using javascript. We used a dummy index 1 which was named, imgNumber. We run into a problem when a user clicks on the next button2 more than five times. We run out of images to show and the last image stays on while the counter keeps on increasing. The same can be said about the previous button. We can fix all this by imposing conditions to our javascript. Here we will employ the if-else statements. 2. The Code 2.1. HTML. We will use the html file you created in Part 1 of this example. 2.2. JAVASCRIPT. Right now you should have one
Date: October 30, 2003. 1 Or a counter variable, or just plain counter or index...you can call it whatever you want, just remember it's just an arbitrary number. 2 Which increases the imgNumber.
1