This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes Click to enlarge image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Click to enlarge image" Watch "Click to enlarge image" New topic
Author

Click to enlarge image

jason pogi
Greenhorn

Joined: Aug 13, 2007
Posts: 9
hi can someone give me an idea on how i implement a Click to enlarge functionality to an image that i retrieve from a database?
regards..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Upon clicking, change the src attribute of the image to that of a server-side resource that returns the enlarged image.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
jason pogi
Greenhorn

Joined: Aug 13, 2007
Posts: 9
hello.. i was able code it but it seems to have some overhead
here is the code sample
this the image in index.jsp that uses image.jsp to retrieve the image from the database i linked the image to Zoom.jsp


here is the code in Zoom.jsp


again it makes use of image.jsp but this time with a larger width and length
is there a more optimized and better way of doing it?
 
 
subject: Click to enlarge image