Solved

Hover Over Photos to Enlarge Them on ASP Page

Posted on 2014-03-30
2
343 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 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now