Solved

Hover Over Photos to Enlarge Them on ASP Page

Posted on 2014-03-30
2
345 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
2 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
pdf file 7 92
Azure Web App Requiring Authentication Back to OnSite AD......ADFS??? 6 49
Grunt script for Build Process 1 42
storing csv file in table variable in Python 2 24
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
This collection of functions covers all the normal rounding methods of just about any numeric value.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

856 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