navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

*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
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> *solved*Is there a way to hide empty fields and the text with them?
Page: [1]
 
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

(in reply to lovduv)
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:30:01   
I feel like it's my use/or non-use as the case may be of "

.....I love ASP, when I can strangle it into doing what I want it to do!

:)

(in reply to 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")")
-----------------------------------------------------------------^

(in reply to lovduv)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Is there a way to hide empty fields and the text wi... - 11/17/2005 0:46:56   
Like so?

<%If len(trim(fp_field(fp_rs,"CommDate")))>0 then%>

<b><font size="1" color="#0000FF">Comment Posted on
<%=FP_FieldVal(fp_rs,"CommDate")%>
</font></b><p>

<%End if%>


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to 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 5:54:40   
Your a star!:)

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> *solved*Is there a way to hide empty fields and the text with them?
Page: [1]
Jump to: 1





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