PC Review Forums Newsgroups Microsoft Word Microsoft Frontpage How to set hyperlink when table field has no data - FP2000 asp

Reply

How to set hyperlink when table field has no data - FP2000 asp

 
Thread Tools Rate Thread
Old 18-01-2005, 07:15 PM   #1
Michael Edwards
Guest
 
Posts: n/a
Default How to set hyperlink when table field has no data - FP2000 asp


I am using FP2000 with an Access Database in the fpdb folder. I store the
url of the party in the database. In a query, I have a field that returns
either "Homepage" or a zero length string. I set the hyperlink to the table
cell to be the URL from the record. It works great; however, if there is no
"Homepage", the cell results are "_" and if you click on it, it brings you
to the homepage of my website.

Is there a way to disable the cell hyperlink if the cell should be blank? or
is there a way to tell the cell to be blank if it is a null value?

--
Sincerely,
muDDfish Mike
http://www.kingmuddfish.com


  Reply With Quote
Old 18-01-2005, 07:40 PM   #2
Kathleen Anderson [MVP - FrontPage]
Guest
 
Posts: n/a
Default Re: How to set hyperlink when table field has no data - FP2000 asp

find in your code where the URL field gets displayed, and change it to this:
<% If fp_rs("URL")> " " then %><a href="<%=FP_FieldLink(fp_rs,"URL")%>"><%
End If %>Also, the URL field in your database needs to be a full URL, i.e.
http://www, not www



--

~ Kathleen Anderson
Microsoft FrontPage MVP
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/



Michael Edwards <mjenco@hotmail.com> wrote:
> I am using FP2000 with an Access Database in the fpdb folder. I store
> the url of the party in the database. In a query, I have a field that
> returns either "Homepage" or a zero length string. I set the
> hyperlink to the table cell to be the URL from the record. It works
> great; however, if there is no "Homepage", the cell results are "_"
> and if you click on it, it brings you to the homepage of my website.
>
> Is there a way to disable the cell hyperlink if the cell should be
> blank? or is there a way to tell the cell to be blank if it is a null
> value?


  Reply With Quote
Old 18-01-2005, 07:48 PM   #3
Michael Edwards
Guest
 
Posts: n/a
Default Re: How to set hyperlink when table field has no data - FP2000 asp

Thanks Kathleen, I should've though of that.

I figured out another fix....I put an IIF statement in the query such that
if the value is null, that instead of putting in a zero length string "", I
inserted a single space string by inserting " ". Very subtle change, but it
removed the hyperlink spaceholder as well, so there is nothing to click on.

Sincerely,
Mike
"Kathleen Anderson [MVP - FrontPage]" <spiderwebwoman@mvps.org> wrote in
message news:eSt5t3Z$EHA.2608@TK2MSFTNGP10.phx.gbl...
> find in your code where the URL field gets displayed, and change it to

this:
> <% If fp_rs("URL")> " " then %><a href="<%=FP_FieldLink(fp_rs,"URL")%>"><%
> End If %>Also, the URL field in your database needs to be a full URL, i.e.
> http://www, not www
>
>
>
> --
>
> ~ Kathleen Anderson
> Microsoft FrontPage MVP
> Spider Web Woman Designs
> http://www.spiderwebwoman.com/resources/
>
>
>
> Michael Edwards <mjenco@hotmail.com> wrote:
> > I am using FP2000 with an Access Database in the fpdb folder. I store
> > the url of the party in the database. In a query, I have a field that
> > returns either "Homepage" or a zero length string. I set the
> > hyperlink to the table cell to be the URL from the record. It works
> > great; however, if there is no "Homepage", the cell results are "_"
> > and if you click on it, it brings you to the homepage of my website.
> >
> > Is there a way to disable the cell hyperlink if the cell should be
> > blank? or is there a way to tell the cell to be blank if it is a null
> > value?

>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off