Solved

How to get larger image on click

Posted on 2012-04-09
3
255 Views
Last Modified: 2012-04-11
Hello EE,

I need to create a web site. i have a list of images to insert in a page and when the user clicks an image, I need the image to Pop larger then with an "X" he can close the larger image and return back to the list


How can I do that ?
0
Comment
Question by:PhilippeRenaud
3 Comments
 
LVL 9

Expert Comment

by:wasiftoor
ID: 37823968
Please refer to the following link:

http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

You can get the Javascript code as well as the Stylesheet code from here.

Good Luck!
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 37823989
add click event handler on each and every image on your page using:
Image1.Attributes["onclick"]="showModalDialog('imagePopup.aspx?url='+this.src,'', '
');

add imagePopup.aspx page, set its position and size and get the image source passing in the url in the Page_load().
0
 
LVL 12

Accepted Solution

by:
Anuradha Goli earned 500 total points
ID: 37826832
The logic behind this scenario is:
In the list you just display the thumbnail of image and , on its hover /click you show the original image.
When you insert image , store it in to folders one with thumbnails by scaling it to 10% of image size,depends on your image size.
And store all the original files in other folder,to popup big image.

For such implementation logic , you can use lot of Jquery image popups
There are a lot of jQuery plugins available for this

Thickbox ---  http://jquery.com/demo/thickbox/
LightBox --- http://leandrovieira.com/projects/jquery/lightbox/
FancyBox --- http://fancybox.net/
FaceBox --- http://famspam.com/facebox
NyroModal --- http://nyromodal.nyrodev.com/
PiroBox ---  http://www.pirolab.it/pirobox/
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

919 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

24 Experts available now in Live!

Get 1:1 Help Now