Subject:
|
HTML for displaying an Image in a scrollable image box
|
Newsgroups:
|
lugnet.publish
|
Date:
|
Tue, 27 Jun 2000 14:48:26 GMT
|
Viewed:
|
551 times
|
| |
| |
I've posted this question in few HTML news groups, so I figured I'd post it
here to, there seem to be some pretty smart coders here on LUGNET.
I'm working on a HTML only project (its a demo of a site) and I need to show
an image viewer that has zoom in/zoom out. Currently I am adjusting the size
of the image and then using the ".crop" to make the image only fit in a given
area.
function ImageZoom()
{
document.all.item("DocImage").style.posWidth = (parseInt
(g_iZoomLevel) * g_iOriginalWidth) / 100;
document.all.item("DocImage").style.posHeight = (parseInt
(g_iZoomLevel) * g_iOriginalHeight) / 100;
document.all.item("DocImage").style.clip =
"rect(0px " + g_iOriginalWidth + "px "
+ g_iOriginalHeight + "px 0px)";
}
This works fine, but it does cause the scroll bars for the browser window to
activate since the large image is hidden in the background.
What I'd like to do is have scroll bars apear around the image when it gets
bigger than the given area. I though I could use <iframe> but since this is
HTML only I can't use any ASP to change the scale of the image.
If this makes any sense to anybody, I'd love some ideas on how make this look
the way I want.
jt
|
|
Message has 2 Replies:
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|