![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In order to avoid creating multiple images on the server, I am scaling images to fit a certain width using HTML (width=???). This is perfect for me because if the user submits a large image I control the display. (a little longer download time but still OK) But if the user uploads a small image, I do not want it resized - example: http://www.cyads.com.cy/Electronics/item.asp?ID=18. I know this can be done with just a little asp but I have tried so many if...then...else which didn't work so I thought I should ask for help. My current code is attached. I am not a very well-versed asp programmer (self taught on the Internet) so whenever I tried to put an <%if..then%> statement replacing the width = "300" everything got distorted. At some point I made it but had a blue border line and in trying to remove it I lost everything. Any help is greatly appreciated. Thank you. %Dim PicShow1 PicShow1 = tNG_showDynamicImage("../", "../ProdPhotos/", "{rsItemElectronics.Photo1}") IF PicShow1 = "../includes/tng/styles/img_not_found.gif" then % div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><%response.Write(" ")%></font></div %else% a href="<%=tNG_showDynamicImage("../", "../ProdPhotos/", "{rsItemElectronics.Photo1}")%>" onclick="return popImage(this.href,'Product Info');" img src="<%=PicShow1%>" alt="Sold by %=(rsItemElectronics.Fields.Item("SellerName").Val ue)%>" </a>width = "300" border="0"></a %End If% |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Thank you for your reply. Although it seems "Image Bounds" will save me many headaches, I cannot use any Server Behaviours because I have no access to the server. It must only be client side scripting. Also, it seems that all I need is a simple ASP code. Thank you again. Harry |
![]() |
| Thread Tools | |
| Display Modes | |
| |