Re: image size
From: Steve Easton (admin_at_95isalive.com)
Date: 12/15/04
- Next message: chip: "Re: Windows Media"
- Previous message: Terry Cooper: "Front page webbot modification"
- In reply to: sbrixner: "Re: image size"
- Next in thread: sbrixner: "Re: image size"
- Reply: sbrixner: "Re: image size"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Dec 2004 09:02:22 -0500
Interesting.
Declaring the variables as global really isn't necessary, but it doesn't hurt anything.
Haven't gotten it to work correctly in Mozilla, Netscape, Firefox yet . But I think the issue is
that the margin info written to the popup has to be set with a style tag rather than inline
Also, I think it's easier if you create a string variable and then use the variable in window.open
like this.
sVar1="left=20"+",top=20"+",Width="+sizew+",Height="+sizeh;
then
newwindow=window.open('','',sVar1);
Here's my "test" page. Haven't tested it in XP SP 2 or Firefox though, so it may be "quirky."
http://www.95isalive.com/test/
the script is in the page.
-- Steve Easton Microsoft MVP FrontPage 95isalive This site is best viewed............ .......................with a computer "sbrixner" <sbrixner@discussions.microsoft.com> wrote in message news:CF1743E3-4476-4548-A04A-86DA6A161DED@microsoft.com... > Thanks very much. I have implemented a revised script on my page. There > seems to be a limit as to how small a window can be, and it doesn't seem to > work in Firefox. Works in Netscape 7 but is a bit slow. You can see the > results at: > > http://www.brixnerdesign.net/milton/catalog.asp > > As you move the mouse pointer over the titles, a thumbnail image will appear > if one exists. The more recent the date, the more likely there is to be an > image. > > Steve Brixner > > "Steve Easton" wrote: > > > The script also needs a closing } > > > > <SCRIPT type=text/javascript> > > function getsize(img){ > > imga = new Image(); > > imga.src=(img); > > sizew=eval(imga.width); > > sizeh=eval(imga.height); > > alert("width="+sizew+",height="+sizeh); > > } > > </script> > > > > > > -- > > Steve Easton > > Microsoft MVP FrontPage > > 95isalive > > This site is best viewed............ > > ........................with a computer > > > > "Steve Easton" <admin@95isalive.com> wrote in message > > news:%23oDAzhj4EHA.3472@TK2MSFTNGP09.phx.gbl... > > > That's easy. Funny you should ask, I'm working on a script that will automatically display any > > size > > > image in the appropriate window, simply by reading the image size and then creating the window. > > > > > > > > > The following will return the dimensions of an image. > > > > > > > > > <SCRIPT type=text/javascript> > > > function getsize(img){ > > > imga = new Image(); > > > imga.src=(img); > > > sizew=eval(imga.width); > > > sizeh=eval(imga.height); > > > alert("width="+sizew+",height="+sizeh); > > > </script> > > > > > > > > > To make it work, use an onclick event containing the name of the image you want to find the > > > dimensions of > > > like this > > > > > > onclick="getsize(imagename.jpg) > > > > > > With this one the image needs to be in the same location as the page running the script. > > > > > > hth > > > > > > Steve Easton > > > Microsoft MVP FrontPage > > > 95isalive > > > This site is best viewed............ > > > .......................with a computer > > > > > > "sbrixner" <sbrixner@discussions.microsoft.com> wrote in message > > > news:7C988056-BE8E-476E-B9B8-EF9BE0DBE19C@microsoft.com... > > > > The height and width in pixels. Thanks. Steve. > > > > > > > > "Steve Easton" wrote: > > > > > > > > > Do you mean height and width or file size?? > > > > > > > > > > -- > > > > > Steve Easton > > > > > Microsoft MVP FrontPage > > > > > 95isalive > > > > > This site is best viewed............ > > > > > ........................with a computer > > > > > > > > > > "sbrixner" <sbrixner@discussions.microsoft.com> wrote in message > > > > > news:22F82495-FD79-4FBC-90AA-20E4BED54E14@microsoft.com... > > > > > > Is there a way of retrieving the size of an image located on the server? > > > > > > Thanks. Steve Brixner > > > > > > > > > > > > > > > > > > > > > > > > > > >
- Next message: chip: "Re: Windows Media"
- Previous message: Terry Cooper: "Front page webbot modification"
- In reply to: sbrixner: "Re: image size"
- Next in thread: sbrixner: "Re: image size"
- Reply: sbrixner: "Re: image size"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|