EasyCFM.COM ColdFusion Forums / Coding Help! / Making Images Appear Dynamically

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Making Images Appear Dynamically

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

subway
12-07-2002 @ 3:28 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 133
Joined: Oct 2002

Hi, I am building a site for a second hand car dealer, and in the catalogue of second hand cars, he wants all specs listed and then a "x" or a "check" next to the specs depending on whether ot not the car has the feature.

For example if the car has AC, there will be an image of a green check/tick next to it, if not there will be a red cross.

Is this achievable?  If so I would really appreciate some help or at least pointers.

Thanks.! Wink

Redmanz
12-07-2002 @ 6:32 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 411
Joined: Oct 2002

Thier was a discussion a few days ago on doing random images dynamically. You could easily use these techniques for the effect you are trying to achieve.

The topic number was 84 for the thread on this topic. If you still need help after reading that thread shout back.........good luck!

Smile

Specialization is for Insects!

(Modified by Pablo to link to the active thread)

This message was edited by Webmaster on 12-7-02 @ 6:36 PM

Webmaster
12-07-2002 @ 6:35 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

OK, let's say that you have a database that has the values:

vehicle_ac  (BIT FORMAT)
vehicle_amfm (BIT FORMAT)
vehicle_cd (BIT FORMAT)
vehicle_automatic (BIT FORMAT)

OK, what you would do within the results is:

<cfif queryname.vehicle_ac eq 1>
  <img src="/images/on.gif">
<cfelse>
  <img src="/images/off.gif">
</cfif>

<cfif queryname.vehicle_amfm eq 1>
  <img src="/images/on.gif">
<cfelse>
  <img src="/images/off.gif">
</cfif>

That should more or less explain how it works...

Thanks,
Pablo Varando
EasyCFM.COM, LLC.

This message was edited by Webmaster on 12-7-02 @ 6:35 PM

subway
12-08-2002 @ 2:53 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 133
Joined: Oct 2002

Ok, thanks guys - I'll be able to work it out from here!


Website Designed and Developed by Pablo Varando.