|
| |
*solved*Is there a way to hide empty fields and the text with them?
View related threads:
(in this forum
| in all forums)
|
Logged in as: Guest
|
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
*solved*Is there a way to hide empty fields and the tex... - 11/16/2005 21:51:47
I use the following code to hide an empty DB field: <b><font size="1" color="#0000FF">Comment Posted on <%=FP_FieldVal(fp_rs,"CommDate")%><%If len(trim(fp_field(fp_rs,"CommDate")))>0 then%> <%=fp_field(fp_rs,"CommDate")%> <%End if%></font></b><p> If there is data in the field then it looks like: Comment posted on <<CommDate>> Is there a way to hide the text "Comment Posted on" to if a field is empty? lovduv
< Message edited by lovduv -- 11/17/2005 5:55:08 >
|
|
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
RE: Is there a way to hide empty fields and the text wi... - 11/16/2005 23:16:43
I tried this: <b><font size="1" color="#0000FF"> <%If FP_FieldVal(fp_rs,"CommDate")<>" "then response.write '"Comment Posted on"&FP_FieldVal(fp_rs,'CommDate')&"</font>"%> <%=FP_FieldVal(fp_rs,"CommDate")%><%If len(trim(fp_field(fp_rs,"CommDate")))>0 then%> <%=fp_field(fp_rs,"CommDate")%> <%End if%></font></b><p> And I got this Microsoft VBScript compilation error '800a040e' 'loop' without 'do' /_fpclass/fpdbrgn2.inc, line 5 Loop ^ ...I am so clueless...help...please lovduv
|
|
|
|
lovduv
Posts: 152 Joined: 8/30/2005 Status: offline
|
RE: Is there a way to hide empty fields and the text wi... - 11/17/2005 0:12:09
Ok, i tried this: <% if Trim(FP_Field(fp_rs,"CommDate")) > "" then response.write("<font>Comment Posted On </font>& FP_Field(fp_rs,"CommDate")") else If len(trim(fp_field(fp_rs,"CommDate")))>0 then%><%=fp_field(fp_rs,"CommDate")%> <%End if%> And it gave me this: Microsoft VBScript compilation error '800a03ee' Expected ')' /missyblog1.asp, line 173 response.write("<font>Comment Posted On </font>& FP_Field(fp_rs,"CommDate")") -----------------------------------------------------------------^
|
|
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
|
|
|