Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

True or False

Posted 19 Apr 2002 07:48:05
1
has voted
19 Apr 2002 07:48:05 David Thomas posted:
Hi,

I am developing (or should i say trying to) develop a resource site for some scripts, using an Access 2000 DB.
I have 2 fields in a table, 1 for IE and 1 for netscape, set as a YES/NO value (checkbox).
So for instance if the script is supported in IE, i get "TRUE" written on my page.
....
Now is there a way, to store 2 images (say a green tick, and a red cross i.e yes/no) and call them into play depending on the value of the checkbox.

If True then (Display Green Tick) kind of thing??

Thanks in Advance.
Dave

(Im very new to this so forgive any ignorance)

"Those who think they know it all, in fact no nothing at all" - Me!

Replies

Replied 19 Apr 2002 08:05:35
19 Apr 2002 08:05:35 Owen Eastwick replied:
You can "show" or "hide" any bit of an ASP page based on a condition determined by a value within a database field e.g.

<% If RecordsetName.Fields.Item("FieldName" = "WhatEver" Then %>
THIS HTML
<% Else %>
THAT HTML
<% End If %>

So to display your different images, something like:

<% If RecordsetName.Fields.Item("FieldName" = "Yes" Then %>
<img src="GreenTick.gif" width="20" height="20" border="0" alt="Yes">
<% Else %>
<img src="RedCross.gif" width="20" height="20" border="0" alt="No">
<% End If %>

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 19 Apr 2002 08:27:46
19 Apr 2002 08:27:46 David Thomas replied:
Cheers for the insight Owen

Thanks for your quick reply.
Dave

"Those who think they know it all, in fact no nothing at all" - Me!

Edited by - DavieT on 19 Apr 2002 08:28:37

Edited by - DavieT on 19 Apr 2002 08:55:45

Reply to this topic