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 / 2129
2128  |  2130
Subject: 
Re: HTML for displaying an Image in a scrollable image box
Newsgroups: 
lugnet.publish
Date: 
Tue, 27 Jun 2000 17:11:36 GMT
Viewed: 
515 times
  
In lugnet.publish, Frank Buiting writes:
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


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.

But your solution interest me. So you're saying that I put the image and the
function in a separate image.htm file, make that image.htm file the "scr" for
the iFrame and reference the Imagezoom() function in the image.htm from my
default.htm file? (assuming that the iframe is in the default.htm) That would
be cool if that what you mean. I'll have to go try it.

Thanks,

jt



Message has 1 Reply:
  Re: HTML for displaying an Image in a scrollable image box
 
(...) [snipped a little] (...) Yup, that is basically it. Also fiddle a little with the iframe's style so it is not too obvious that the picture is inside a frame (no borders and no margins etc.)... I have used the 'function call in another (...) (24 years ago, 27-Jun-00, to lugnet.publish)

Message is in Reply To:
  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

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