Hi.
Right here's my problem:
I want to create a thumbnail viewer exactly like <!-- m --><a class="postlink" href="http://www.campbellmithun.com/work/default.asp">http://www.campbellmithun.com/work/default.asp</a><!-- m -->. So far I've got a single image changing back and forth, but I want the page to show three images and move them one by one (as on Campbellmithun). Here's my current code:
<Script language=JavaScript>
<!--
Urls = new Array("0.gif","1.gif","2.gif","3.gif", "4.gif","5.gif","6.gif","7.gif","8.gif","9.gif","10.gif")
P = 0
Counter = Urls.length - 1
function Previous() {
if (P == 0)
{document.Sliding.src=Urls[9];P=10}
if (P > 0){/*Here P ( 10.gif doesn't exist ) is = 10 */P--;
document.Sliding.src=Urls[P/* Here P is = 9 */]}}
function Next() {
if (P < Counter)
{P++;document.Sliding.src=Urls[P]
if (P == 10)
{document.Sliding.src=Urls[0];P=0} }}
//-->
</Script>
- Call it
<img src=http://www.webdeveloper.com/forum/archive/index.php/"0.gif" name="Sliding" alt="Slideshow">
<a href="javascriptrevious()"><br>Previous</a> <a href="javascript:Next()">Next</a>
Any help you guys can give would be greatly appreciated!!!!
Many thanks
Matt Faulkner
Right here's my problem:
I want to create a thumbnail viewer exactly like <!-- m --><a class="postlink" href="http://www.campbellmithun.com/work/default.asp">http://www.campbellmithun.com/work/default.asp</a><!-- m -->. So far I've got a single image changing back and forth, but I want the page to show three images and move them one by one (as on Campbellmithun). Here's my current code:
<Script language=JavaScript>
<!--
Urls = new Array("0.gif","1.gif","2.gif","3.gif", "4.gif","5.gif","6.gif","7.gif","8.gif","9.gif","10.gif")
P = 0
Counter = Urls.length - 1
function Previous() {
if (P == 0)
{document.Sliding.src=Urls[9];P=10}
if (P > 0){/*Here P ( 10.gif doesn't exist ) is = 10 */P--;
document.Sliding.src=Urls[P/* Here P is = 9 */]}}
function Next() {
if (P < Counter)
{P++;document.Sliding.src=Urls[P]
if (P == 10)
{document.Sliding.src=Urls[0];P=0} }}
//-->
</Script>
- Call it
<img src=http://www.webdeveloper.com/forum/archive/index.php/"0.gif" name="Sliding" alt="Slideshow">
<a href="javascriptrevious()"><br>Previous</a> <a href="javascript:Next()">Next</a>
Any help you guys can give would be greatly appreciated!!!!
Many thanks
Matt Faulkner