|
| |
|
|
octavious
Posts: 68 Joined: 2/10/2005 From: Northern California Status: offline
|
Image Resize revisited - a past thread - 5/3/2005 1:13:03
http://www.frontpagewebmaster.com/m-91979/tm.htm Im wondering if anyone can assist me with this past thread. I found it from a search and it is exactly what I need to fix the images on my site. Can anyone out there familiar with this code assist me? I downloaded both of the .asp scripts - propresize and imgsz and seem to be having a problem with the script. I keep getting the following error: Microsoft VBScript compilation error '800a03ea' Syntax error /asp_spcp/propresize.asp, line 31 function ImageResize(strImageName, intDesiredWidth, intDesiredHeight) ^ Im using the script with FrontPage with the image name stored in Access DB and displayed with image path to a folder via DRW. I was wondering if you can assist me with this error message. I placed the following: <!--#INCLUDE FILE='propresize.asp'--> <!--#INCLUDE FILE='imgsz.asp'--> at the very top of my DRW settings and my image code looks like this: <img src="<%=FP_FieldLink(fp_rs,"ImageName")%>" <%=ImageResize(../htm_spcp/photoalbum/(FP_FieldLink(fp_rs,"ImageName")),500,500)%>> I'm looking at your sample and tried my best to copy it, but I think the error is coming from the two .asp scripts. Also you had another sample code you gave: <img src=" <%=FP_FieldVal(fp_rs," path" )%>" width=" 200" height=" <%=FindImgH(FP_FieldVal(fp_rs," width" ), FP_FieldVal(fp_rs," height" ), 200)%>" > Now, the red number is your constant width for all of the images; You can change it as desired. You' re probably wondering what the whole FindImgH thing is, though. Well, it' s one of two functions that I made to return either the new width or height of an image based on its old dimensions (used to find the ratio) and *one* of its new dimensions. Here' s the code (you can place this at the top of your page)... <% Function FindImgH(intOrigW,intOrigH,intNewW) if (intOrigW = 0) then FindImgH = false else FindImgH = round((intOrigH/intOrigW)*intNewW,0) end if End Function %> I tried this out as well and got an error message. Any help would be greatly appreciated, Octavious
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|