If then else help needed (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


99bird -> If then else help needed (8/26/2004 11:32:38)

I have used the following for blank lines in a table. This way based on the information my table is collapsible.

<% If Len(FP_Field(fp_rs,"design_number2")) > 0 Then %>
<%=FP_FieldVal(fp_rs,"design_number2")%><br>
<% End If %>

My question is? Can the same be done for images?

I am trying to use the following,

<%IF (FP_FieldVal(fp_rs,"finish10")) = "finish/blank.jpg" then%>
<% FP_FieldLink(fp_rs,"finish10") = "" %>
<%else%>
<img border="0" src="<%=FP_FieldLink(fp_rs,"finish10")%>">
<%End if%>

but I keep getting the following error;

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'FP_field'

Do I need to remove the reference to finish/blank and leave the field blank?

What I am trying to accomplish is that if there is no reference to an image in the table, that no field shows in the table and leaves a blank space as with the "blank line statement" listed at the start of this post. But if there a reference to a image. I want to show the image and fill that column in the table.

I hope that I haven't confused everyone as I am.

You help and assistance is greatly appreciated.




bobby -> RE: If then else help needed (8/26/2004 11:40:54)

quote:

<%IF (FP_FieldVal(fp_rs,"finish10")) = "finish/blank.jpg" then%>
<% FP_FieldLink(fp_rs,"finish10") = "" %>
<%else%>
<img border="0" src="<%=FP_FieldLink(fp_rs,"finish10")%>">
<%End if%>


Maybe like this?

<%
IF (FP_FieldVal(fp_rs,"finish10")) = "finish/blank.jpg" then
response.write ""
else
%>
<img border="0" src="<%=FP_FieldLink(fp_rs,"finish10")%>">
<%
end if
%>




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875