/    Sign up×
Community /Pin to ProfileBookmark

Javascript image gallery help

I need help with a script I modified and cannot reach the original creator, though many failed attempts.

If you go to this URL…
[url]http://nt1.adventuresports.com/service/authenticoutdoors/AOIportfolio.asp?SubCat=Adventure#[/url]

I have previous and next links that work great from the ORIGINAL big image on the page, but I NEED to get the sequence of photos to pick up from the image that shows up when you click on one of the thumbnails on the right side of the page.

Currently, when i click a thumbnail, the previous and next links start from the beginning photo, this is not what I want!

I cannot seem to add an appropriate variable to make this work.

Please help, and IT MUST WORK IN ALL BROWSERS! Thanks.

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@Mr_JNov 08.2003 — Post the code you have, it should be adaptable
Copy linkTweet thisAlerts:
@why_not_macauthorNov 11.2003 — THIS IS THE HEAD SECTION......

<!-- Original: Daniel Smith ([email protected]) -->

<!-- Web Site: http://home.earthlink.net/~xalres -->

<!-- MODIFIED by Norm Schurdell http://www.whynotdesign.com -->

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin

prev1 = new Image (32,18);

prev1.src = "prev1.jpg";

prev2 = new Image (32,18);

prev2.src = "prev2.jpg";

next1 = new Image (32,18);

next1.src = "next1.jpg";

next2 = new Image (32,18);

next2.src = "next2.jpg";

go1 = new Image (48,24);

go1.src = "go1.jpg";

go2 = new Image (48,24);

go2.src = "go2.jpg";

maxPic = 12;


p1 = new Image (350,350);

p1.src = "images/adkclimb156_2.jpg";

link1 = "images/adkclimb156_2.jpg";


p2 = new Image (350,350);

p2.src = "images/adkclimb27_2.jpg";

link2 = "images/adkclimb27_2.jpg";


p3 = new Image (350,350);

p3.src = "images/brushbrook29_2.jpg";

link3 = "images/brushbrook29_2.jpg";


p4 = new Image (350,350);

p4.src = "images/chicchocski213_2.jpg";

link4 = "images/chicchocski213_2.jpg";


p5 = new Image (350,350);

p5.src = "images/climberw-leaves_2.jpg";

link5 = "images/climberw-leaves_2.jpg";


p6 = new Image (350,350);

p6.src = "images/kayaklakechamplain153_2.jpg";

link6 = "images/kayaklakechamplain153_2.jpg";


p7 = new Image (350,350);

p7.src = "images/lostskiareas66_2.jpg";

link7 = "images/lostskiareas66_2.jpg";


p8 = new Image (350,350);

p8.src = "images/nepal1846_2.jpg";

link8 = "images/nepal1846_2.jpg";


p9 = new Image (350,350);

p9.src = "images/p99h82_2.jpg";

link9 = "images/p99h82_2.jpg";


p10 = new Image (350,350);

p10.src = "images/rumney50_2.jpg";

link10 = "images/rumney50_2.jpg";


p11 = new Image (350,350);

p11.src = "images/sleepyhollow6_2.jpg";

link11 = "images/sleepyhollow6_2.jpg";


p12 = new Image (350,350);

p12.src = "images/tet18_2.jpg";

link12 = "images/tet18_2.jpg";



count = 1;

function next() {

count++;

if (count > maxPic) {

count = 1;

}

eval("document.p.src=p" + count + ".src");

}

function prev() {

count--;

if (count == 0) {

count = maxPic;

}

eval("document.p.src=p" + count + ".src");

}

function link() {

location.href=eval("link" + count);

}

// End -->

</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->


THESE ARE THE PREV and NEXT LINKS......

<P><IMG SRC="images/spacer.gif" WIDTH="100" HEIGHT="1" BORDER="0"></P>

<P> <A HREF="javascript:prev()" NAME="prev">

<FONT SIZE="2" COLOR="#FFFFFF" FACE="Arial, Helvetica">&lt; Previous</FONT></A></P>

<P> <A HREF="javascript:next()" NAME="next">

<FONT SIZE="2" COLOR="#FFFFFF" FACE="Arial, Helvetica"> Next &gt;</FONT></A></P>

THIS IS A SAMPLE OF THE GALLERY SECTION......

<TD VALIGN="MIDDLE" ALIGN="CENTER"><A HREF="#" ONCLICK="p.src=p1.src">

<IMG SRC="images/adkclimb156_1.jpg" WIDTH="60" HEIGHT="60" BORDER="0" NAME="thumb"></A>

</TD>

<TD VALIGN="MIDDLE" ALIGN="CENTER"><A HREF="#" ONCLICK="p.src=p2.src">
<IMG SRC="images/adkclimb27_1.jpg" WIDTH="60" HEIGHT="60" BORDER="0" NAME="thumb"></A>
</TD>

<TD VALIGN="MIDDLE" ALIGN="CENTER"><A HREF="#" ONCLICK="p.src=p3.src">
<IMG SRC="images/brushbrook29_1.jpg" WIDTH="60" HEIGHT="60" BORDER="0" NAME="thumb"></A>
</TD>

</TR><TR>

<TD VALIGN="MIDDLE" ALIGN="CENTER"><A HREF="#" ONCLICK="p.src=p4.src">

<IMG SRC="images/chicchocski213_1.jpg" WIDTH="60" HEIGHT="60" BORDER="0" NAME="thumb"></A>

</TD>

THANKS! THANKS! THANKS!
Copy linkTweet thisAlerts:
@Mr_JNov 12.2003 — Please take a look in the zip.

Let me know how it goes

[upl-file uuid=f41ecb38-6423-4810-a7aa-2a12c627ded0 size=3kB]welcome.zip[/upl-file]
Copy linkTweet thisAlerts:
@why_not_macauthorNov 12.2003 — THANK YOU SOOO MUCH Mr J - you are the supreme webmaster in my book!

? ? ?
Copy linkTweet thisAlerts:
@why_not_macauthorNov 12.2003 — One more question for ya Mr J, or anyone. The script you sent works great! And for that I am thankful, but please also look at the following page and around line 82 is the original ASP code, I cannot get the javascript Array to be populated as an ASP variable by accessing a data store.

For this script (it images) will change and be unique with each page it calls.

Thanks again.

[upl-file uuid=2244f3e3-0aff-4ce6-8aac-f258a3ec0770 size=4kB]aoiportfolio-script_asp.zip[/upl-file]
Copy linkTweet thisAlerts:
@Mr_JNov 15.2003 — Hi [B]why_not_mac[/B]

Unfortunately I cannot help you with ASP or PHP problems as I have not yet delved into the wonders that they can do.

Sometime in the near future I hope to start learning about these codes, but for now I am sorry that I cannot help you further


?
Copy linkTweet thisAlerts:
@why_not_macauthorNov 15.2003 — Thank you anyway for all of your help, best wishes for your future code endeavors.
×

Success!

Help @why_not_mac spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...