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 / 2128
2127  |  2129
Subject: 
Re: HTML for displaying an Image in a scrollable image box
Newsgroups: 
lugnet.publish
Date: 
Tue, 27 Jun 2000 15:22:48 GMT
Viewed: 
502 times
  
In lugnet.publish, James J. Trobaugh writes:

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)";

}

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.

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 side scripting. So in that perspective IFRAME is probably acceptable.

Is is possible to call a function in another frame, in this case I would put
the image in the IFRAME with the above function. The zoom buttons on the main
page call the function in the frame to scale the image correctly.
Calling a function in another frame is done like this:
object.document.ImageZoom()
where 'object' is the reference to the frame.

--
Frank Buiting

Visit the LEGO Lexicon: http://members.chello.nl/~f.buiting/lego/



Message has 1 Reply:
  Re: HTML for displaying an Image in a scrollable image box
 
(...) Frank, I guess I should have worded the orginal question better, I didn't mean to say HTML only, but I think client side only would have been better worded. I realize that the current function isn't ASP. I should have been more clear, my bad. (...) (24 years ago, 27-Jun-00, to lugnet.publish)

Message is in Reply To:
  HTML for displaying an Image in a scrollable image box
 
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 (...) (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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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