Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resize image to framesize

Status
Not open for further replies.

Mariootje

Programmer
Aug 10, 2001
33
NL
Hi there,

Is it possible to open an image in a frame en have it automatically resized to the size of the frame, so you don't have to scroll to see the whole image.

Mario
 
frameset page:

<html>
<head></head>
<frameset rows=&quot;50%,50%&quot; frameborder=&quot;yes&quot; border=&quot;1&quot; framespacing=&quot;0&quot;>
<frame name=&quot;topFrame&quot; src=&quot;top.htm&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; >
<frame name=&quot;bottomFrame&quot; src=&quot;bottom.htm&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; >
</frameset>
</html>

top.htm:

<html>
<head></head>
<body>
<a href=&quot;#&quot; onclick=&quot;ChangeImage(); return false&quot;>Change Bottom Image</a>
<script language=javascript>
function ChangeImage()
{
parent.frames[&quot;bottomFrame&quot;].document.ImageHolder.src=&quot;comp12.gif&quot;;
}
</script>
</body></html>

bottom.htm:

<html>
<head></head>
<body>
<img name=ImageHolder style=&quot;width:90%; height:90%&quot; src=&quot;manbut2_60.gif&quot;>
</body></html>



This wont work in Netscape4.x but its a quick one for IE and N6
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top