|
octavious -> Help with ImageResize function (4/12/2008 11:50:39)
|
Im using the ImageResize function to display images uploaded by users to a specific dimension. However, I went one step further providing them an option to display the image in its original size or the specs applied by the ImageResize. My problem is that I cant seem to find the correct format to make this function work within an IF.. THEN statement. This is my statement to simply apply the ImageResize:
<img border="0" src="../photos/<%=ImageName%>"<%=ImageResize(Server.MapPath("../photos/" & <%=ImageName%>),55,65)%> alt="<%=ImgTitle%>">
This is my IF.. THEN statement that I cant seem to format or get to work properly: <%
IF XDSPFORMAT=2 THEN
RESPONSE.WRITE "<img border='0' src='../photos/"&XIMAGENAME&"'> "
ELSE IF XDSPFORMAT=1 THEN
RESPONSE.WRITE "<img border='0' src='../photos/"&XIMAGENAME&" ' "&ImageResize(Server.MapPath('../photos/' & "&XIMAGENAME&" ),525,525)&" > "
END IF
%> The first statement (XDSPFORMAT=2 ) works fine, but the second statement is not working for me. I'm sure it's just some type of formatting error. This is the error I get: Microsoft VBScript compilation error '800a03ea' Syntax error editphoto.asp, line 226 RESPONSE.WRITE "<img border='0' src='../photos/"&XIMAGENAME&"' "&ImageResize(Server.MapPath('../photos/' & "&XIMAGENAME&" ),525,525)&" > " --------------------------------------------------------------------------------------------^ I have tried several different variations of the quotes and ampersands and cant seem to get this function to work within an ASP statement. Any help would be greatly appreciated!! Thanks, O:)
|
|
|
|