DRW Question

  • Thread starter Thread starter CJ
  • Start date Start date
C

CJ

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.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
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= said:
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
 
Can you paste section of your code where you are displaying the images?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
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.
 
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)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
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.
 
OK, then testing for "Sold STC" will work.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
You are welcome!

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DRW: Change record source without modifying output 3
DRW Question 2
Display Pictures from Access database 7
onmouseover in DRW 1
DRW: Display hyperlink as normal text 4
SQL Help 2
DRW Question.... 3
DRW 4

Back
Top