[Javascript] Re: Getting image size and controlling window

Jefferis Peterson jefferis at petersonsales.net
Tue Oct 1 14:13:45 CDT 2002


This isn't quite working because I think my image is a variable. Shouldn't
the doc write be in the header?:


> <TITLE>Large View of <?php echo $img; ?></TITLE>
 ></HEAD>
> <BODY 
> onLoad="self.resizeTo(document.imgItemPic.width,document.imgItemPic.height+2
> 5)" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"
> bgcolor="black" text="#FFFFFF">
> <script language="JavaScript" type="text/JavaScript">
> document.write("<IMG src='/<?php echo $img; ?>'>" + window.name + ".lg.jpg'
> border='0' 
> name='imgItemPic'>");
> </script>
> <DIV align="center">
> <IMG src="/<?php echo $img; ?>"><br>
> On 10/1/02 3:14 PM, "Cutter (javascript list)"
> <javascript at theblades-family.com> wrote:

YOUR CODE WAS:
> <!--- pic.html //--->
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> 
> <html>
> <head>
> <title>Your Title</title>
> 
> </head> 
> 
> <body 
> onLoad="self.resizeTo(document.imgItemPic.width,document.imgItemPic.height+2
> 5)" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
> <script>
> document.write("<img src='images/" + window.name + ".lg.jpg' border='0'
> name='imgItemPic'>");
> </script>
> </html>
> <!--- end //---> 
> 
> Pay attention to the onload event

~~~~~~~~~~~~
Jefferis Peterson, Pres.
Web Design and Marketing
http://www.PetersonSales.net
Tel . 724-458-7169
ICQ 19112253

http://www.Slippery-Rock.com - 7,000 hits per year




More information about the Javascript mailing list