[Javascript] Img posiition?

FRANCESC ESCOFET fescofet at datadec.es
Tue Jul 17 11:23:28 CDT 2001


Thanks but it dosent work, clientTop, and clientLeft dont work too
so...anybody knows how get the position of a any document element? 


> -----Mensaje original-----
> De:	Filipiak, Bob (Contractor) [SMTP:filipiab at atsc.army.mil]
> Enviado el:	martes 17 de julio de 2001 18:20
> Para:	FRANCESC ESCOFET; ANTONIO PEREZ; ANTONIO TORTOLA
> Asunto:	RE: [Javascript] Img posiition?
> 
> Try offsetTop and offsetLeft 
> 
> Bob Filipiak (Contractor) 
> MCP 
> 
> -----Original Message----- 
> From: Jeff Walters [ <mailto:jeff at cybermill.com>] 
> Sent: Tuesday, July 17, 2001 12:04 PM 
> To: javascript at LaTech.edu 
> Subject: Re: [Javascript] Img posiition? 
> 
> 
> > 
> > Sorry folks 
> > anybody knows how I can get the position (top and left) of a img? 
> > 
> > this dont work--- 
> > 
> > <script> 
> >  alert (document.all['my_img'],style.pixelTop);  // this alert return 0 
> >  alert (document.all['my_img'],style.pixelLeft); // this alert return 0 
> > </script> 
> > 
> > <img id="my_img" src="my_img.gif"> 
> > 
> 
> You have a comma where there should be a period. 
>   alert (document.all['my_img'].style.pixelTop);  // this alert return 0 
>   alert (document.all['my_img'].style.pixelLeft); // this alert return 0 
> 
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
> Jeff Walters   (314) 962-4024 
> 
> Cybermill Communications 
> 8616 Joseph Ave 
> St. Louis, MO 63144 
> Jeff at cybermill.com 
> <http://www.cybermill.com/> 
> 
> _______________________________________________ 
> Javascript mailing list 
> Javascript at LaTech.edu 
> <http://www.LaTech.edu/mailman/listinfo/javascript> 
> 



More information about the Javascript mailing list