|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
IF in HyperlinkI have a Data Results table and some records have a field with a pdf
document hyperlinked, but not all.records have one. Is there a way where on the hyperlink I can say show PDF link only if the field is populated? As at resent I have people clicking on the links (empty ones) and getting nothing. Thanks John P. You could wrap the code in a script that tests whether or not there is
anything in that field: here's an example: <% If fp_rs("Municipality") > " " then %> <li><b>Municipality:</b> <!--webbot bot="DatabaseResultColumn" startspan s-columnnames="ProgramArea,RecordNum,Date,ItemNumber,SplitItem,Session,PA_SA ,ActNumber,Section,Recipient,Municipality,FundsUse,DollarField1,DollarField2 ,DollarField3,DollarField4,Any_Previous,DollarField5,FundNum,AgencyNum,SID,P roject_Num,Description" s-column="Municipality" b-tableformat="FALSE" b-hashtml="FALSE" clientside preview="<font size="-1"><<</font>Municipality<font size="-1">>></font>" b-makelink b-MenuFormat --><%=FP_FieldVal(fp_rs,"Municipality")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="33247" --></li> <% End If %> -- Show quoteHide quote~ Kathleen Anderson Microsoft MVP - FrontPage Spider Web Woman Designs Expression Web Resources: http://www.spiderwebwoman.com/xweb/ Expression Web Wiki: http://expression-web-wiki.com/ FrontPage Resources: http://www.spiderwebwoman.com/resources/ Please reply to the newsgroup for the benefit of others "John P." <park***@gmail.com> wrote in message news:e9pqGbvqJHA.3992@TK2MSFTNGP04.phx.gbl... >I have a Data Results table and some records have a field with a pdf >document hyperlinked, but not all.records have one. > > Is there a way where on the hyperlink I can say show PDF link only if the > field is populated? > > As at resent I have people clicking on the links (empty ones) and getting > nothing. > > Thanks > John P. > PS
- the test you posted only checks if the field is greater than a space " " <% If fp_rs("Municipality") > " " then %> Better to use a test for an empty record as <% If fp_rs("Municipality")<> "" Then %> Or <% If Len(fp_rs("Municipality")>0 Then %> -- Show quoteHide quote_____________________________________________ SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ] "Warning - Using the F1 Key will not break anything!" (-; _____________________________________________ "Kathleen Anderson" <kander***@remove.mvps.org> wrote in message news:O$OH45vqJHA.3700@TK2MSFTNGP06.phx.gbl... | You could wrap the code in a script that tests whether or not there is | anything in that field: | | here's an example: | | | <% If fp_rs("Municipality") > " " then %> | | | <li><b>Municipality:</b> <!--webbot bot="DatabaseResultColumn" | startspan | | | s-columnnames="ProgramArea,RecordNum,Date,ItemNumber,SplitItem,Session,PA_SA | ,ActNumber,Section,Recipient,Municipality,FundsUse,DollarField1,DollarField2 | ,DollarField3,DollarField4,Any_Previous,DollarField5,FundNum,AgencyNum,SID,P | roject_Num,Description" | s-column="Municipality" b-tableformat="FALSE" b-hashtml="FALSE" | clientside | preview="<font | size="-1"><<</font>Municipality<font | size="-1">>></font>" b-makelink | b-MenuFormat --><%=FP_FieldVal(fp_rs,"Municipality")%><!--webbot | bot="DatabaseResultColumn" endspan i-checksum="33247" --></li> | | | <% End If %> | | | | | -- | | ~ Kathleen Anderson | Microsoft MVP - FrontPage | Spider Web Woman Designs | Expression Web Resources: http://www.spiderwebwoman.com/xweb/ | Expression Web Wiki: http://expression-web-wiki.com/ | FrontPage Resources: http://www.spiderwebwoman.com/resources/ | Please reply to the newsgroup for the benefit of others | | | "John P." <park***@gmail.com> wrote in message | news:e9pqGbvqJHA.3992@TK2MSFTNGP04.phx.gbl... | >I have a Data Results table and some records have a field with a pdf | >document hyperlinked, but not all.records have one. | > | > Is there a way where on the hyperlink I can say show PDF link only if the | > field is populated? | > | > As at resent I have people clicking on the links (empty ones) and getting | > nothing. | > | > Thanks | > John P. | > | |
Other interesting topics
Re: Using HTML To Download File
Updating records in database GIF Frame Timing capture data from hyperlink RE: Form getting buried in "bot" spam How to update Access cb using DIW UPDATING Access records Re: add an option on a web page to be able to turn music on or off Is FrontPage Where To begin? Using HTML To Download File |
|||||||||||||||||||||||