To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.publishOpen lugnet.publish in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Publishing / 2126
2125  |  2127
Subject: 
HTML for displaying an Image in a scrollable image box
Newsgroups: 
lugnet.publish
Date: 
Tue, 27 Jun 2000 14:48:26 GMT
Viewed: 
409 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:
  Re: HTML for displaying an Image in a scrollable image box
 
(...) Your sample looks like javascript, not HTML-only at all. I'm not saying that to be bitchy -- just a suggestion that you might have better luck asking in javascript forums. (24 years ago, 27-Jun-00, to lugnet.publish)
  Re: HTML for displaying an Image in a scrollable image box
 
(...) A small note about the scaling function you wrote; it isn't ASP, ASP is server side so if the user would press a button, the request has to do a trip to the server and back to make it's effect visible, the code you posted is typically client (...) (24 years ago, 27-Jun-00, to lugnet.publish)

7 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR