codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Dynamic image dimensions  ms526 at 13:18 on Wednesday, August 16, 2006
 

Hi,

I run an Image hosting website, and am a beginner at javascript.

I have a viewing page where users can view an uploaded image in my site. When users upload large images (in terms of dimensions)
it breaks the layout of the page. I did think of using the height and width attributes for the image tags, but then small images are stretched. I have a flash image viewer which works well, but it only works with jpeg images. gif, png and bmp images still suffer the same problem.

I would like to be able to set the maximum image width, but get smaller for the smaller images. I think there may be a solution in javascript, but am not sure how I would go about it. I also thought of using server-side scripting to set the image size attributes, my site uses coldfusion and i'm not aware of any way to get it to find the dimensions of the image.

Thanks.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  problem in servlet
•  Re: installing DB_File on Perl Package Manager(PPM)
•  Re: Pass asp data to a javascript menu tree...
•  reading margins at run-time -- HELP!!!!!
•  Re: Need expertise - converting
•  Dynamic image dimensions
•  Dissolve effect for images using Javascript!
•  Javascript question
•  Re: urgent a j2ee problem


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006