Gossamer Forum
Home : Products : DBMan : Customization :

Problems with search and if/else statements

Quote Reply
Problems with search and if/else statements
 I am trying to get dbman to work for my wife's realtor site. I have some search problems. Viewing works great and most searching works except:

When I use the radio button to find all records with Virtual Tours, the proper records show but the if 'virtual' eq yes, it isn't showing the button link to the tour. Any other search and the button shows.

When I use the drop down to find all pending or backupoffer records, the proper records show but the text on the top right of each listing which is per the if/else statement is "available" which is my final else. All other searches and it is okay.

Seems when I use a specific search, the if/else that pertains to that record fails. Please help!!!

Link to page to view issue: http://soldbygilda.com/featured.htm

Link to html.pl to view sub html_record: http://www.soldbygilda.com/help/html.txt

Link to default.cfg: http://www.soldbygilda.com/help/default.txt

Thanks in advance!!!

Chris
Quote Reply
Re: [jnjhost] Problems with search and if/else statements In reply to
try turning bolding off in your cfg file. might help with the picture problem

as for the second, first try setting the select statement to

Code:
<SELECT NAME="Status">
<OPTION>---
<OPTION VALUE="Available">Available
<OPTION VALUE="For Rent">For Rent
<OPTION VALUE="On Hold">On Hold
<OPTION VALUE="Pending">Pending
<OPTION VALUE="Rented">Rented
<OPTION VALUE="Sold">Sold
<OPTION VALUE="BackupOffers">BackupOffers
</SELECT>


if that doesn't work, how about simplying the IF statements

Code:
if ($rec{'Status'} eq 'Sold') { print "<B><I>Sold $rec{'SoldDate'}</I></B>"; }
if ($rec{'Status'} eq 'BackupOffers') { print "<I><B>Backup Offers Only</B></I>"; }
if ($rec{'Status'} eq 'For Rent') { print "<I><B>For Rent</B></I>"; }
if ($rec{'Status'} eq 'Rented') { print "<I><B>Rented</B></I>"; }
if ($rec{'Status'} eq 'Pending') { print "<I><B>In Escrow</B></I>"; }
if ($rec{'Status'} eq 'On Hold') { print "<B><I>Currently On Hold</I></B>"; }
if ($rec{'Status'} eq 'Available') { print "<B><I>Available</I></B>"; }


I know, not as elegant, but if it's not working, it is worth a try...


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] Problems with search and if/else statements In reply to
Thank you for the quick response! I'll get back to you on the results.

Chris
Quote Reply
Re: [esm] Problems with search and if/else statements In reply to
Worked wonderfully! I've noticed the bolding adds the <b> in weird places sometimes. Taking the bolding off seems to be a good idea for anybody who does any customization.

The select statement worked great too! The correct text shows now.

Chris
Quote Reply
Re: [jnjhost] Problems with search and if/else statements In reply to
Glad that worked.

well, it's not so weird when you think about it. it's actually doing exactly what it is designed to do. just that the browser doesn't like something like...<IMG SRC="/images/<b>virtual</b>.gif" WIDTH="90" HEIGHT="120" BORDER=0 ALT="">



BTW...Nice site!


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] Problems with search and if/else statements In reply to
Thank you for the compliment. I'm actually pretty proud of it (and the wife actually agrees). I'm not much of a developer (creatively challenged). Usually takes me three times before I actualy create a design that is even acceptable. Can host like a racehorse, outsource the development.

Chris