?
Solved

Hover Over Photos to Enlarge Them on ASP Page

Posted on 2014-03-30
2
Medium Priority
?
349 Views
Last Modified: 2014-03-31
I have an ASP web page that holds ten thumbnail photos.  I want to be able to hover over the thumbnails and have an enlarged photo of each pop up.  I found some code to do this at http://cssdemos.tupence.co.uk/image-popup.htm.  One of the problems I am having is the sample code requires an unordered list of the thumbnails.  This is easy if your photos are statically held in an Images folder.  Mine are dynamic, served to the page inside recordsets; one for thumbnail photos (rsThumbs), and the other for enlargements of the thumbnails (rsLarge).

How can I move through these recordsets and create a <li> tag for each of the ten thumbnail photos and a <span> tag for each of the enlargements that are served?
 
If you follow the above link and see how the process works, it may take less time for you experts to understand my dilemma.  If, on the other hand, someone has an easier or better way to do this, I would love to hear it.

Thanks!!
0
Comment
Question by:shanej
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1500 total points
ID: 39965587
Just use 'response.write' or <%=...%> to put the image file names in the 'src' attributes.
    <!--THE IMAGES ARE PLACED IN AN UNORDERED LIST-->
    <ul class="enlarge"> <!--We give the list a class so that we can style it seperately from other unordered lists-->

    <!--First Image-->
    <li>
    <img src="<% response.write("image01s.jpg") %>" width="150px" height="100px" alt="" /> <!--thumbnail image-->
    <span> <!--span contains the popup image-->
    <img src="<% response.write("image01L.jpg") %>" alt="" /> <!--popup image-->
    <br /><% response.write("Image 1 caption") %><!--caption appears under the popup image-->
    </span>
    </li>

    <!--Second Image-->
    <li>
    <img src="<%="image02s.jpg" %>" width="150px" height="100px" alt="" /> <!--thumbnail image-->
    <span> <!--span contains the popup image-->
    <img src="<%="image02L.jpg" %>" alt="" /> <!--popup image-->
    <br /><%="Image 2 caption" %><!--caption appears under the popup image-->
    </span>
    </li>

    </ul>

Open in new window

0
 

Author Closing Comment

by:shanej
ID: 39967908
I found another solution at http://www.dynamicdrive.com/style/csslibrary/item/css-popup-image-viewer/P20/.  Thanks for your quick response with the limited info I gave you.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question