Solved

Displaying image in jsp doubt

Posted on 2011-09-14
2
279 Views
Last Modified: 2012-05-12
Hi Experts...
I have three images that i need to display in a comperssed format and on clicking one of the images i need to display in the display region as shown below.
Please help... sample template
0
Comment
Question by:gaugeta
2 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 36540732
try this one
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<style>
		#leftColumn
		{
			width:100px;
			height:400px;
			float:left;
		}
		#leftColumn .imageThumbnail
		{
			width:110px;
			height:110px;
			border:1px solid #000;
			margin-bottom:25px;
		}

		#leftColumn .imageThumbnail img
		{
			width:110px;
			height:110px;
		}

		#displayArea
		{
			width:400px;
			height:400px;
			float:left;
			margin-left:25px;
			border:1px solid #000;
		}
		#displayArea img
		{
			width:400px;
			height:400px;
		}
	</style>
	<script>
		function displayInMainArea(thisObj)
		{
			document.getElementById("displayArea").innerHTML = "<img src='" + thisObj.getAttribute("src") +"'>";
		}
	</script>
</HEAD>

<BODY>
	<div id="container">
		<div id="leftColumn">
			<div class="imageThumbnail"><img src="lastscan.jpg" onclick="displayInMainArea(this)"/></div>
			<div class="imageThumbnail"><img src="lastscan.jpg" onclick="displayInMainArea(this)"/></div>
			<div class="imageThumbnail"><img src="lastscan.jpg" onclick="displayInMainArea(this)"/></div>
		</div>
		<div id="displayArea"></div>
	</div>
</BODY>
</HTML>

Open in new window

0
 

Author Comment

by:gaugeta
ID: 36540782
@gurvinder372:Thanks a lot.
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 describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

867 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

21 Experts available now in Live!

Get 1:1 Help Now