<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=550155611-07062001><FONT face=Arial color=#0000ff
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=550155611-07062001><FONT face=Arial color=#0000ff
size=2> I think the problem is when the body loads the image
has not yet loaded? I can't get it to work.</FONT></SPAN></DIV>
<DIV><SPAN class=550155611-07062001><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550155611-07062001><FONT face=Arial color=#0000ff
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=550155611-07062001><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=550155611-07062001><FONT face=Arial color=#0000ff
size=2>Andrew</FONT></SPAN></DIV>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> javascript-admin@LaTech.edu
[mailto:javascript-admin@LaTech.edu]<B>On Behalf Of </B>Rodney
Myers<BR><B>Sent:</B> Thursday, 7 June 2001 7:46 PM<BR><B>To:</B>
javascript@LaTech.edu<BR><B>Subject:</B> Re: [Javascript] OPEN WINDOW TO EXACT
SIZE<BR><BR></FONT></DIV>PPK,
<P>Very interesting that that is possible.
<P>A small obstacle still to be got around I think. <BR>If the URL sent to
window open is myImage.jpg then there will be no body tag. <BR>The workaround
would be to have an HTML file which included your body tag and send the image
file name as a query string attached to the URL of the html page
<P>"mypage.htm?myImage.jpg"
<P>Then script in mypage.htm writes the image tag
<P><TT>document.write('<IMG
src="',window.location.search.substring(1),'">');</TT>
<P>If image names had non alpha characters (eg spaces [yuk]) then the code would
have to escape/unescape the image file name, I think.
<P>Rodney
<P>Peter-Paul Koch wrote:
<BLOCKQUOTE TYPE="CITE">> I am opening a pop up
window that displays an image. I need the window <BR>>to be the exact size
of the image. Is there a way to do this without <BR>>knowing how big the
image is going to be?
<P>In the popup:
<P><BODY <BR>onLoad="if (self.resizeTo)
<BR>self.resizeTo(document.images[0].width,document.images[0].height"> (one
<BR>line!)
<P>ppk <BR><A
href="http://www.LaTech.edu/mailman/listinfo/javascript"></A> </P></BLOCKQUOTE>
<P>-- <BR>Shop@ssistant Add-ons and Developer Workshops <BR><A
href="http://www.aflyingstart.net/addons/">http://www.aflyingstart.net/addons/</A>
<P>Enquiries regarding Shop@ssistant Classic training : <BR>Call 01256 880770
<P>Rodney Myers <BR>Based in Oxford, England <BR>Technical Director,
Shop@ssistant eCommerce Solutions <BR> </P></BODY></HTML>