This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Front Page > July 2004 > DRW Question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hi
I've used the FP2003 Database Results Wizard to produce property search
pages such as:
http://www.mymea.co.uk/search_2c.asp
What I would like to be able to do is show a default picture if the property
is sold. There is a field in the database which indicates when a property is
sold, but is there any way I can change the displayed picture depending on
the value of this database field?
All the "sold" properties would use the same picture.
Any advice appreciated.
CJ
| |
| Thomas A. Rowe 2004-07-30, 7:15 pm |
| Why hide the photo, place the word SOLD above or below the photo?
<% If fp_rs("sold") = True then %>SOLD<% End If %>
where ever you want the word to be displayed.
To swap the photos, do
<% If fp_rs("sold") = True then %><img src="sold.gif"><% Else %><img src="<%=fp_rs("image")%><% End
If %>
Both of the above requires that you manual code this into your page in HTML / Code View.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
"CJ" <c355456@hotmail.com> wrote in message news:%23SOcjVldEHA.3044@TK2MSFTNGP10.phx.gbl...
> Hi
>
> I've used the FP2003 Database Results Wizard to produce property search
> pages such as:
>
> http://www.mymea.co.uk/search_2c.asp
>
> What I would like to be able to do is show a default picture if the property
> is sold. There is a field in the database which indicates when a property is
> sold, but is there any way I can change the displayed picture depending on
> the value of this database field?
>
> All the "sold" properties would use the same picture.
>
> Any advice appreciated.
>
> CJ
>
>
| |
|
| > Why hide the photo, place the word SOLD above or below the photo?
>
> <% If fp_rs("sold") = True then %>SOLD<% End If %>
>
> where ever you want the word to be displayed.
>
> To swap the photos, do
>
> <% If fp_rs("sold") = True then %><img src="sold.gif"><% Else %><img
src="<%=fp_rs("image")%><% End
> If %>
>
> Both of the above requires that you manual code this into your page in
HTML / Code View.
>
Thanks, I'll give that a try.
| |
|
| > Thanks, I'll give that a try.
>
Perhaps I'm being stupid, but I just couldn't get that to work - it just
gave me two images side-by-side. I'm a little confused as to the use of the
fp_rs("sold") - presumably I just replace this with the actuall value of the
field, i.e. fp_rs("Sold, STC") - or do I change fp_rs to the field name?
I've tried (and failed!) to do this at http://www.mymea.co.uk/search_4d.asp
If you do have a chance to take a look I'd be very grateful.
CJ
| |
| Thomas A. Rowe 2004-07-31, 12:14 pm |
| Can you paste section of your code where you are displaying the images?
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
"CJ" <c355456@hotmail.com> wrote in message news:OkMjqbudEHA.1652@TK2MSFTNGP09.phx.gbl...
>
> Perhaps I'm being stupid, but I just couldn't get that to work - it just
> gave me two images side-by-side. I'm a little confused as to the use of the
> fp_rs("sold") - presumably I just replace this with the actuall value of the
> field, i.e. fp_rs("Sold, STC") - or do I change fp_rs to the field name?
>
> I've tried (and failed!) to do this at http://www.mymea.co.uk/search_4d.asp
>
> If you do have a chance to take a look I'd be very grateful.
>
> CJ
>
>
| |
|
| > Can you paste section of your code where you are displaying the images?
<% If fp_rs("Sold, STC") = True then %><img src="/photos/sold.jpg"><% Else
%><img
src="<%=fp_rs("/photos/<%=FP_FieldLink(fp_rs,"PhotoOneURL")%>.jpg")%><% End
If %>
I'm probably being dim. Thanks.
| |
| Thomas A. Rowe 2004-07-31, 7:14 pm |
| Ok, the following assumes that "STC" is a Yes/No field in the database set to use True/False and not
Yes/No as the values, and the STC is also the field that indicates it the property is sold or not.
<% If fp_rs("STC") = True then %>
<img src="/photos/sold.jpg">
<% Else %>
<img src="/photos/<%=fp_rs("PhotoOneURL")%>.jpg">
<% End If %>
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
"CJ" <c355456@hotmail.com> wrote in message news:OrdvLhydEHA.2752@TK2MSFTNGP12.phx.gbl...
>
> <% If fp_rs("Sold, STC") = True then %><img src="/photos/sold.jpg"><% Else
> %><img
> src="<%=fp_rs("/photos/<%=FP_FieldLink(fp_rs,"PhotoOneURL")%>.jpg")%><% End
> If %>
>
> I'm probably being dim. Thanks.
>
>
| |
|
| > Ok, the following assumes that "STC" is a Yes/No field in the database set
to use True/False and not
> Yes/No as the values, and the STC is also the field that indicates it the
property is sold or not.
>
> <% If fp_rs("STC") = True then %>
> <img src="/photos/sold.jpg">
> <% Else %>
> <img src="/photos/<%=fp_rs("PhotoOneURL")%>.jpg">
> <% End If %>
OK, I can see how that works, the complicating factor is that "Sold STC" is
one possible value of the Status field. Other values include "For Sale" ,
"Under Offer" etc. The sold photo is to be displayed when Status="Sold STC".
So perhaps I want something like:
<% If fp_rs("Status") = "Sold STC" then %> <img src="/photos/sold.jpg"> <%
Else %> <img src="/photos/<%=fp_rs("PhotoOneURL")%>.jpg"> <% End If %>
That might work.
Thanks a lot for your help, by the way.
| |
| Thomas A. Rowe 2004-07-31, 7:14 pm |
| OK, then testing for "Sold STC" will work.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
"CJ" <c355456@hotmail.com> wrote in message news:unxX0PzdEHA.228@TK2MSFTNGP11.phx.gbl...
> to use True/False and not
> property is sold or not.
>
> OK, I can see how that works, the complicating factor is that "Sold STC" is
> one possible value of the Status field. Other values include "For Sale" ,
> "Under Offer" etc. The sold photo is to be displayed when Status="Sold STC".
>
> So perhaps I want something like:
>
> <% If fp_rs("Status") = "Sold STC" then %> <img src="/photos/sold.jpg"> <%
> Else %> <img src="/photos/<%=fp_rs("PhotoOneURL")%>.jpg"> <% End If %>
>
> That might work.
>
> Thanks a lot for your help, by the way.
>
>
>
| |
|
| > OK, then testing for "Sold STC" will work.
Indeed it did, many thanks.
CJ
| |
| Thomas A. Rowe 2004-07-31, 7:14 pm |
| You are welcome!
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
"CJ" <c355456@hotmail.com> wrote in message news:u7U1yK0dEHA.3212@TK2MSFTNGP12.phx.gbl...
>
> Indeed it did, many thanks.
>
> CJ
>
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|