jpmoriarty
11-26-2002, 04:02 AM
I've tried this in the graphics forum without much luck, so thought I'd throw it to the java monkies to see what can be done (no offence intended!):
I'm using a java script image gallery thing that scrolls through some images on my page. Nice and simple, works well, and I'm not too bothered about the non javascript views who cant see it since it's hardly a matter of life and death, and if they dont want to use the bloomin' technlology that someones taken the time to invent then that's up to them.
ahem
anyway, the problem is that as it scrolls through the images, I would love it if I had some way of checking what width the image that's about to be displayed is. Then, if it saw that the image was over 360, for example, it set the width of the image to 360 so that it got scaled down. i dont want to have to tell it the dimensions of every image using the width/height commands, and nor do i want EVERY image to display at 360 width - if it's slimmer than that then I'm quite happy for it to stay that way. It's just for the ones that are bigger than 360 that will mess up my tables, they're the ones that I want scaled down so that they fit.
Am I being far too optimistic with this, would I need an applet, or is it just not possible at all?
help me java-script guru's, you're my only hope...
I'm using a java script image gallery thing that scrolls through some images on my page. Nice and simple, works well, and I'm not too bothered about the non javascript views who cant see it since it's hardly a matter of life and death, and if they dont want to use the bloomin' technlology that someones taken the time to invent then that's up to them.
ahem
anyway, the problem is that as it scrolls through the images, I would love it if I had some way of checking what width the image that's about to be displayed is. Then, if it saw that the image was over 360, for example, it set the width of the image to 360 so that it got scaled down. i dont want to have to tell it the dimensions of every image using the width/height commands, and nor do i want EVERY image to display at 360 width - if it's slimmer than that then I'm quite happy for it to stay that way. It's just for the ones that are bigger than 360 that will mess up my tables, they're the ones that I want scaled down so that they fit.
Am I being far too optimistic with this, would I need an applet, or is it just not possible at all?
help me java-script guru's, you're my only hope...