Question

Javascript slide show in popup window?

Asked by: TequilaMockingbird

I'd like to incorporate a slide show like this one in a web project I'm creating in Adobe DW CS3

http://www.obererthompson.com/restoration/

Can anyone point me to a source for this script?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-02-26 at 12:18:48ID24181536
Tags

javascript slide show popup

Topics

JavaScript

,

Adobe Creative Suite

,

Miscellaneous Web Development

,

Asynchronous Javascript and XML (AJAX)

,

Adobe Dreamweaver

Participating Experts
2
Points
250
Comments
24

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Flash CS3 photo slide show
    I am working with Adobe Flash CS3. I want to create a slide show of photos where the users pushes a button to advance to the next photo. Thanks Chuck
  2. Flash CS3 Slide Presentation
    hello. i'm new to Flash and would like to create a simple slide show. i have added my images as slides and added narration to the first parent slide. it works well but i have to hit a key to proceed to next slide. how do i get it to automatic play each slide? thank you for ...
  3. Flash Slide Presentation
    I need to to a slideshow similar to the BestBuy one (http://www.bestbuy.ca/home.asp?newlang=EN&logon=&langid=EN). The slides change automatically with a transition and you have the posibility to jump to any of the 3 at anytime. Can this be done with "Flash Slid...
  4. Adobe Professional 7 - Convert slide show animations in …
    I have a powerpoint presentation at a particular page which uses animation to display an arrow and then disappear. When I convert the entire powerpoint to Adobe PDF, the animation does not show rather overlays the entire set of graphics as shown on slide page. How I conv...
  5. Need Slide Presentation to Continuously loop
    This probably has a very simple solution but its been driving me nuts and im apologizing for asking this in advance. -- I have a slide presentation that i want to automatically advance with the help of actionscript. i have a code on the end of each slide that triggers it to ...
  6. navigation for slide presentation
    In Adobe Flash CS3 how do you change between different slides in ActionScript 3. I am surprise there isn't a navigation bar. Just looking for some code examples. Basically what i am talking about is when you click on file then go to new Flash Slide Presentation that is wha...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: v2MediaPosted on 2009-02-27 at 00:51:50ID: 23753779

Javascript has little to do with this example. JS only manages the chromeless window and button roll-overs. Going by the url parameters, there's a database back end that handles each slide show.

A little more info is needed from you though. Are you familiar with handling databases in dreamweaver?

If you have a small budget, popping this little app would be sweet: - http://www.projectseven.com/products/galleries/ssm/index.htm

 

by: TequilaMockingbirdPosted on 2009-02-27 at 04:46:46ID: 23755099

Thanks v2. I am not familiar with handling databases in DW. The client I'm building this site for doesn't have a budget for me to add a database-driven gallery. We were going to use some of the built-in DW widgets to add some photos, but the client sent me the link I posted above after we'd already set a price for the project and asked, "Can you do this?" I don't like to say "No, not with your budget," without researching first.

I found a free gallery app for my previous project,(see http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/ASP/Q_23969337.html ) but it ended up costing me big-time, as it took our programmers nine hours to incorporate it into our existing ASP.NET project!

I like the projectseven gallery, but I don't know how I could use it to create a page like the one I linked to above.

 

by: v2MediaPosted on 2009-02-27 at 15:24:15ID: 23760561

Either way, someone will have to write up some custom code for you. The final part of presenting a slide show in a pop-up window is, unfortunately, the easy part. This could be coded up in a matter of minutes. The not-so-easy part is how to administer the different slideshows. As you have posted any requirements for this, that leaves only the end product to discuss.

You have two choices; static or dynamic image handling. If static, the image paths in a given slideshow are outputted to a javascript array. When the pop window loads, the prev-next buttons iterate through the array of images. If dynamic, the prev-next buttons use dynamic URL's to request the desired image from the server and the request is processed by server-side code, an asp.net script in your case.

Which would you prefer?

 

by: jason1178Posted on 2009-02-27 at 15:27:45ID: 23760594

>> If you have a small budget, popping this little app would be sweet:

Ugh.  Why not use lightview instead?  
http://www.nickstakenburg.com/projects/lightview/

PVII produces some nice stuff, but I think they are optimistically priced (read:  overpriced).

 

by: v2MediaPosted on 2009-02-27 at 15:39:31ID: 23760670

That's just a lightbox spin-off Jason, and isn't intended for a pop-up (also doesn't work on my FF3 install). I would have recommended lightbox if it weren't for the pop-up requirement.

 

by: jason1178Posted on 2009-02-27 at 15:41:35ID: 23760679

lightview, lightbox, viewbox, boxview.

I get so confused.

 

by: TequilaMockingbirdPosted on 2009-02-28 at 05:28:21ID: 23763551

lightview, lightbox, viewbox, boxview, lightheaded......

I'm going to have to read your post above more carefully, v2, before I can answer your question. In fact, I'm not even sure I know what the question is. A quick glance tells me, probably the first, since it doesn't involve asp.net scripting. But then, I don't know all the advantages/disadvantages of either method.

I'm so confused......

 

by: TequilaMockingbirdPosted on 2009-02-28 at 05:40:15ID: 23763595

v2, please define "administer" the slide shows. I have one thing in mind, but you may have another. Do you mean, administer on an ongoing basis, adding new pictures, shows, etc? If that's what you mean, that would be done, not by the client, but by me - I have an ongoing maintenance agreement with them post-launch.

If you mean something else altogether, then please 'splain.

 

by: v2MediaPosted on 2009-02-28 at 17:43:34ID: 23766296

That's what I mean, yes; adding new slides and slide shows. That being the case, I'd say the following would be easy enough for you to keep updated.

Basically you create a separate html file for each pop-up slide show. The javascript in each slide file handles the images for the show.

<!--  the links to each slideshow -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Slide Shows</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" language="javascript">
	function popSlide() {
		window.open('','slideShow','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=400,left=50,top=50,titlebar=no');
	}
</script>
</head><body>
<ul>
  <li><a href="popSlideShow1.htm" target="slideShow" onclick="popSlide()">Slideshow 1 link</a></li>
  <li><a href="popSlideShow2.htm" target="slideShow" onclick="popSlide()">Slideshow 2 link</a></li>
  <li><a href="popSlideShow3.htm" target="slideShow" onclick="popSlide()">Slideshow 3 link</a></li>
</ul>
</body></html>
 
<!-- an example pop slide show file
     popSlideShow1.htm -->
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Slide Show</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body { margin: 0px; padding: 0px;}
-->
</style>
</head>
<script language="javascript" type="text/javascript">
 var num = 0;
 var slides = [];
 
 // add new slides by copying the last line of the array, increase the
 // array index by 1, then modify the image text and path to suit.
 // If the image text has an apostrophy, escape it with a backslash for eg: -
 // 'Bob\'s car is red.' - NOT 'Bob's car is red.'
 //
 // slides[index] = [ 'slide text' , 'path/to/image.jpg' ]
 slides[1] = ['Some text to describe image 1.','slides/image1.jpg'];
 slides[2] = ['Some text to describe image 2.','slides/image2.jpg'];
 slides[3] = ['Some text to describe image 3.','slides/image3.jpg'];
 slides[4] = ['Some text to describe image 4.','slides/image4.jpg'];
 
 var limit = slides.length;
 
 function loadSlide(i) {
	num = num + i;
	if(num < 1) num = 1;
	if(num > limit) num = limit;
	if(slides[num]) {
		slideTxt = slides[num][0];
		slideImg = slides[num][1];
	} else {
		slideTxt = slides[1][0];
		slideImg = slides[1][1];
	}
	document.getElementById("slide").src = slideImg;
	document.getElementById("slideText").innerHTML = slideTxt;
	window.focus();	
 }
</script>
<body>
<table width="580" border="0" align="center" cellpadding="6" cellspacing="0">
  <tr>
    <td colspan="3">
      <div align="center"><img src="" alt="slide image" name="slide" width="480" height="320" id="slide" style="background-color: #999999" /></div>
    </td>
  </tr>
  <tr>
    <td height="37" colspan="3">
      <div align="center" id="slideText">Some text to describe this image.</div>
    </td>
  </tr>
  <tr>
    <td width="288"><a href="javascript:loadSlide(-1);">Previous</a></td>
    <td width="292">
      <div align="center"><a href="javascript:close();">close</a></div>
    </td>
    <td width="292">
      <div align="right"><a href="javascript:loadSlide(1);">Next</a></div>
    </td>
  </tr>
</table>
<script language="javascript" type="text/javascript">
	loadSlide(1);
</script>
</body></html>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:

Select allOpen in new window

 

by: TequilaMockingbirdPosted on 2009-02-28 at 18:30:33ID: 23766422

v2, THANK YOU, this looks amazing! I will not have a chance to experiment with it until Monday. If it's all right with you, I'd like to keep this question open in case I have trouble implementing or understanding your instructions.

 

by: TequilaMockingbirdPosted on 2009-03-05 at 13:16:31ID: 23810813

I haven't forgotten about you, v2. I just haven't had the opportunity to implement this yet .... can we leave it open just a little longer?

 

by: v2MediaPosted on 2009-03-05 at 15:59:42ID: 23812605

no worries - q'n can stay open for about a week or so before a mod comes along and starts closing it down.

 

by: TequilaMockingbirdPosted on 2009-03-11 at 06:48:41ID: 23857083

I'm still working on this. I had another little problem I have to figure out before I can go on to this feature. "Please don't throw me on the cart, I'm not dead yet."

 

by: jason1178Posted on 2009-03-11 at 10:44:49ID: 23860054

21 days, actually

 

by: TequilaMockingbirdPosted on 2009-03-13 at 13:26:27ID: 23883187

Ok, v2, I've made some progress on this - but obviously, there is something about the instructions above that I'm missing or don't understand correctly.

http://www.jpcltdservices.com/Project_gallery.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Alternate Template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>JPC Project Gallery</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
	background-image: url(Images/BGattempt3.jpg);
	background-repeat: repeat;
}
 
-->
</style>
<!-- InstanceBeginEditable name="head" -->
 
<link href="main.css" rel="stylesheet" type="text/css" />
<!-- InstanceEndEditable -->
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
 
<link href="mainalt.css" rel="stylesheet" type="text/css" />
</head>
 
<body>
<table class="MainContent" width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
  	<td class="MainContent">
<div align="left"><img src="Images/JPCMasthead.jpg" alt="Masthead" width="800" height="119" /><br />
        <img src="Images/20YearsServiceBanner.gif" alt="20 Years Serving Central New York" width="800" height="30" /><br />
    </div></td>
  </tr>
  
  <tr class="MainContent" align="left" valign="top">
    <td class="MainContent">
      <table width="790" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><table width="100%" border="0" cellpadding="7">
            <tr>
              <td width="16%" valign="top">
              
              
              
              
              <ul id="MenuBar1" class="MenuBarVertical">
             
                  <li><a href="index.html">Home</a></li>
                  <li><a href="residential.html" class="MenuBarItemSubmenu">Residential Services</a>
                      <ul>
                        <li><a href="air_duct_r.html">Air Duct Cleaning</a></li>
                        <li><a href="carpet_r.html" class="MenuBarItemSubmenu">Carpet &amp; Upholstery Cleaning</a>
                          <ul>
                            <li><a href="carpet_FAQ_r.html">Carpet Cleaning FAQ</a></li>
                            <li><a href="One_minute_movie.html">Carpet Cleaning Movie</a></li>
                          </ul>
                        </li>
                        <li><a href="water_r.html">Water Damage Restoration</a></li>
                        <li><a href="mold_r.html">Mold Remediation</a></li>
                        <li><a href="fire_r.html">Fire &amp; Smoke Cleanup</a></li>
                        <li><a href="biorecovery_r.html">Bio-Recovery Services</a></li>
                        <li><a href="testimonials_r.html">Testimonials</a></li>
                        <li><a href="packages_r.html">Packages</a></li>
                        <li><a href="specials_r.html">Specials</a></li>
                      </ul>
                  </li>
                  <li><a href="commercial.html" class="MenuBarItemSubmenu">Commercial Services</a>
                    <ul>
                      <li><a href="air_duct_c.html">Air Duct Cleaning</a></li>
                      <li><a href="carpet_c.html" class="MenuBarItemSubmenu">Carpet &amp; Upholstery Cleaning</a>
                        <ul>
                          <li><a href="carpet_FAQ_c.html">Carpet Cleaning FAQ's</a></li>
                        </ul>
                        </li>
                      <li><a href="water_c.html">Water Damage Restoration</a></li>
                      <li><a href="mold_c.html">Mold Remediation</a></li>
                      <li><a href="fire_c.html">Fire &amp; Smoke Cleanup</a></li>
                      <li><a href="biorecovery_c.html">Bio-Recovery Services</a></li>
                      <li><a href="testimonials_c.html">Testimonials</a></li>
                    </ul>
                    </li>
                  <li><a href="about.html">About Us</a></li>
                  <li><a href="contact.html">Contact Us</a></li>
                  <li><a href="links.html">Links</a></li>
                  <li><a href="newsletters.html">Newsletters</a></li>
                  <li><a href="Project_gallery.html">Project Gallery</a> </li>
                </ul>
                <p align="left" class="style23">&nbsp; </p>
                </td>
              <td width="84%" valign="top"><!-- InstanceBeginEditable name="EditMe" -->
                <p>&nbsp;</p>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" language="javascript">
        function popSlide() {
                window.open('','slideShow','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=400,left=50,top=50,titlebar=no');
        }
</script>
</head><body>
<ul>
  <li><a href="pop_slide_show_1.html" target="slideShow" onclick="popSlide()">Slideshow 1 link</a></li>
 
                <p>&nbsp;</p>
                <p>&nbsp;</p>
              <!-- InstanceEndEditable --></td>
            </tr>
            
          </table>
            <table width="100%" border="0" cellpadding="3">
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>            <p>&nbsp;</p>          </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <p>&nbsp;</p>
    </td>
  </tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
<!-- InstanceEnd --></html>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:

Select allOpen in new window

 

by: v2MediaPosted on 2009-03-13 at 15:18:21ID: 23884179

The relative paths to the image files are pointing to a folder above root "../"

Remove all instances of "../" from the image paths and you're in business.

 

by: TequilaMockingbirdPosted on 2009-03-13 at 16:20:16ID: 23884610

Ok, I did that, still no joy.....

Do I need to put the images in a different location - not inside a sub-folder of the root folder - in order for this to work? They are in http://www.jpcltdservices.com/Images/DuctSlides/filename.jpg I thought I'd make a separate folder within the Images folder for each slide show, just to keep things organized.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Commercial Carpet Cleaning Slide Show</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body 
{ margin: 0px; padding: 0px;}
-->
</style>
</head>
<script language="javascript" type="text/javascript">
 var num = 0;
 var slides = [];
 
 // add new slides by copying the last line of the array, increase the
 // array index by 1, then modify the image text and path to suit.
 // If the image text has an apostrophy, escape it with a backslash for eg: -
 // 'Bob\'s car is red.' - NOT 'Bob's car is red.'
 //
 // slides[index] = [ 'slide text' , 'path/to/image.jpg' ]
 slides[1] = ['This is a dirty air duct.','Images/DuctSlides/CDC-1.jpg'];
 slides[2] = ['See how grubby this is!','Images/DuctSlides/CDC-2.jpg'];
 slides[3] = ['Kinda makes you wanna barf, doesn't it?','Images/DuctSlides/CDC-3.jpg'];
 slides[4] = ['But this is how clean it could be!','Images/DuctSlides/CDC-4.jpg'];
 
 var limit = slides.length;
 
 function loadSlide(i) {
        num = num + i;
        if(num < 1) num = 1;
        if(num > limit) num = limit;
        if(slides[num]) {
                slideTxt = slides[num][0];
                slideImg = slides[num][1];
        } else {
                slideTxt = slides[1][0];
                slideImg = slides[1][1];
        }
        document.getElementById("slide").src = slideImg;
        document.getElementById("slideText").innerHTML = slideTxt;
        window.focus(); 
 }
</script>
<body>
<table width="580" border="0" align="center" cellpadding="6" cellspacing="0">
  <tr>
    <td colspan="3">
      <div align="center"><img src="" alt="slide image" name="slide" width="350" height="263" id="slide" style="background-color: #999999" /></div>
    </td>
  </tr>
  <tr>
    <td height="37" colspan="3">
      <div align="center" id="slideText">Some text to describe this image.</div>
    </td>
  </tr>
  <tr>
    <td width="288"><a href="javascript:loadSlide(-1);">Previous</a></td>
    <td width="292">
      <div align="center"><a href="javascript:close();">close</a></div>
    </td>
    <td width="292">
      <div align="right"><a href="javascript:loadSlide(1);">Next</a></div>
    </td>
  </tr>
</table>
<script language="javascript" type="text/javascript">
        loadSlide(1);
</script>
</body></html>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:

Select allOpen in new window

 

by: TequilaMockingbirdPosted on 2009-03-13 at 16:50:20ID: 23884709

And, as long as you're looking ..... if I wanted to place a thumbnail above the description, how do I include that in the "link"?

 

by: TequilaMockingbirdPosted on 2009-03-14 at 13:25:26ID: 23888403

Well I'll be dipped - I found it! It was the stray apostrophe in "doesn't" in one of the captions!

I still haven't discovered how to include the thumbnail on the gallery page in the link....

 

by: v2MediaPosted on 2009-03-14 at 15:20:27ID: 23888854

"I still haven't discovered how to include the thumbnail on the gallery page in the link...."

That's another question.

 

by: TequilaMockingbirdPosted on 2009-03-14 at 17:31:43ID: 23889278

I did it. I don't suppose it will "validate", but it works. Thanks!

 

by: TequilaMockingbirdPosted on 2009-03-14 at 17:40:41ID: 31551843

Thanks for giving me the actual SOLUTION, not just a bunch of 'search results' to weed through.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...