|
|||||||
| JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...) |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am building a photogallery for the website that I am working on, but I can't seem to get the javascript for the slideshow to work. I want the veiwer to be able to click a "next" or "previous" and view the photos...I have about 107 photos for this album alone. I have been staring at this code for about 3 days and I just can't find the problem... when I pull it up in the browser and click on "next" or "previous" I get an "error on page" message on the status bar then it says "javascript:doNext()" Please help...here is my code:
<html lang="en"> <head> <title></title> </head> <body><BODY TEXT="#000000" LINK="red" VLINK="blue" BGCOLOR="#616D7E"><FONT FACE="Pristina" size="4.5" COLOR="#800517"><MARQUEE bgcolor="#616D7E" font color="#800517" font face= loop="-1" scrollamount="8" width="100%"><b>This is one of many controlled burns conducted as part of our fire and rescue training.</b></MARQUEE></FONT> <HR COLOR="#1569C7"> <p align="center"><img name="myPicture" src="E:\Delhifire.com\Website Coding\DFD-burn-2005-001.jpg"> <script language="JavaScript"> <!-- //Slide Show script (this notice must stay intact) //For this and more scripts //visit java-scripts.net or http://wsabstract.com var myPix = new Array("DFD-burn-2005-001.jpg","DFD-burn-2005-002.jpg","DFD-burn-2005-004.jpg", "DFD-burn-2005-005.jpg","DFD-burn-2005-021.jpg","DFD-burn-2005-022.jpg","DFD-burn-2005-028.jpg","DFD-burn-2005-044.jpg", "DFD-burn-2005-045.jpg","DFD-burn-2005-046.jpg","DFD-burn-2005-049.jpg","DFD-burn-2005-053.jpg","DFD-burn-2005-056.jpg", "DFD-burn-2005-058.jpg","DFD-burn-2005-059.jpg","DFD-burn-2005-061.jpg","DFD-burn-2005-063.jpg","DFD-burn-2005-064.jpg", "DFD-burn-2005-065.jpg","DFD-burn-2005-066.jpg","DFD-burn-2005-067.jpg","DFD-burn-2005-069.jpg","DFD-burn-2005-070.jpg", "DFD-burn-2005-071.jpg","DFD-burn-2005-072.jpg","DFD-burn-2005-073.jpg","DFD-burn-2005-074.jpg","DFD-burn-2005-075.jpg", "DFD-burn-2005-076.jpg","DFD-burn-2005-077.jpg","DFD-burn-2005-078.jpg","DFD-burn-2005-082.jpg","DFD-burn-2005-083.jpg", "DFD-burn-2005-084.jpg","DFD-burn-2005-087.jpg","DFD-burn-2005-089.jpg","DFD-burn-2005-091.jpg","DFD-burn-2005-093.jpg", "DFD-burn-2005-094.jpg","DFD-burn-2005-097.jpg","DFD-burn-2005-099.jpg","DFD-burn-2005-100.jpg","DFD-burn-2005-105.jpg", "DFD-burn-2005-109.jpg","DFD-burn-2005-111.jpg","DFD-burn-2005-113.jpg","DFD-burn-2005-115.jpg","DFD-burn-2005-116.jpg", "DFD-burn-2005-117.jpg","DFD-burn-2005-120.jpg","DFD-burn-2005-121.jpg","DFD-burn-2005-122.jpg","DFD-burn-2005-124.jpg", "DFD-burn-2005-127.jpg","DFD-burn-2005-129.jpg","DFD-burn-2005-130.jpg","DFD-burn-2005-132.jpg","DFD-burn-2005-134.jpg", "DFD-burn-2005-135.jpg","DFD-burn-2005-137.jpg","DFD-burn-2005-139.jpg","DFD-burn-2005-146.jpg","DFD-burn-2005-149.jpg", "DFD-burn-2005-151.jpg","DFD-burn-2005-152.jpg","DFD-burn-2005-153.jpg","DFD-burn-2005-154.jpg","DFD-burn-2005-156.jpg", "DFD-burn-2005-157.jpg","DFD-burn-2005-159.jpg","DFD-burn-2005-160.jpg","DFD-burn-2005-170.jpg","DFD-burn-2005-171.jpg", "DFD-burn-2005-174.jpg","DFD-burn-2005-183.jpg","DFD-burn-2005-184.jpg","DFD-burn-2005-186.jpg","DFD-burn-2005-188.jpg", "DFD-burn-2005-190.jpg","DFD-burn-2005-192.jpg","DFD-burn-2005-193.jpg","DFD-burn-2005-196.jpg","DFD-burn-2005-197.jpg", "DFD-burn-2005-199.jpg","DFD-burn-2005-201.jpg","DFD-burn-2005-202.jpg","DFD-burn-2005-203.jpg","DFD-burn-2005-205.jpg", "DFD-burn-2005-223.jpg","DFD-burn-2005-231.jpg","DFD-burn-2005-236b.jpg","DSC03053.jpg","DSC03054.jpg", "DSC03073.jpg","File0001.jpg","File0002.jpg","File0006.jpg","File0008.jpg", "File0011.jpg","File0013.jpg","File0017.jpg","File0019.jpg","File0023.jpg", "File0024.jpg","File0027.jpg","File0028.jpg","File0034.jpg")var thisPic = 0 function doPrevious() { if (document.images && thisPic > 0) { thisPic-- document.myPicture.src=myPix[thisPic] } } function doNext() { if (document.images && thisPic < 108) { thisPic++ document.myPicture.src=myPix[thisPic] } } // --> </script> <br><small><font face="Verdana"><a href="javascript:doPrevious()">Previous</a><font color="#FFFFFF">-</font> <a href="javascript:doNext()">Next</a></font></small> </body> </html> |
|
#2
|
||||
|
||||
|
Not sure if this is the problem, but it might be:
Code:
if (document.images && thisPic > 0) {
...
if (document.images && thisPic < 108) {
Code:
if (document.images && (thisPic > 0)) {
...
if (document.images && (thisPic < 108)) {
|
|
#3
|
|||
|
|||
|
nope...I tried that just now..it still gives me the error on page message..
|
|
#4
|
||||
|
||||
|
Is this really the way your code is?
Quote:
Code:
... "File0024.jpg","File0027.jpg","File0028.jpg","File0034.jpg"); var thisPic = 0; |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|