Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 12th, 2005, 02:45 PM
stensol stensol is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Netherlands
Posts: 28 stensol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 9 m 10 sec
Reputation Power: 0
(2x) If Result = ... Then ... Else ...

Hi there,

Thanks to 'NoFriends' my bookcatalog-script is almost ready. See for that: http://forums.aspfree.com/showthread.php?t=45304

But I'd like to add one extra function to the search-script:
when the script runs through the database it will display the results into HTML-tables, sorted by category.

I want to make a function that when the result Categorie is similiar to "Revue der Sporten" or "Sport in Beeld", it will display the Dutch word "Uitgever" between the <td> tags.

But when the result Categorie is similiar to "tijdschriften" it has to display the word "Nummer" between the <td> tags.

And when none of the above 2 cases matches the result, it has to display the word "Auteur" between the <td> tags.

'NoFriends' already made an example for me, but suggested to post it here for any other ideas. This sample only works for one 'If Result-tag' and an '<% else %>' tag.

So I'd ask you how to combine the two pieces of script below.

Code:
************

<% if Results("Categorie") = "Revue der Sporten" or "Sport in Beeld" then %> 
<td width="20%" height="20" valign="top">
<font color="#888888"><b>Uitgever</b></font>
</td>

<% else %>

<td width="20%" height="20" valign="top">
<font color="#888888"><b>Auteur</b></font>
</td>

<% end if %>

************

<% if Results("Categorie") = "tijdschriften" then %> 

<td width="20%" height="20" valign="top">
<font color="#888888"><b>Nummer</b></font>
</td>

<% else %>

<td width="20%" height="20" valign="top">
<font color="#888888"><b>Auteur</b></font>
</td>

<% end if %>

************


Hope someone has the solution,
thnx for help.

Best regards,
Bart Stens, The Netherlands

Reply With Quote
  #2  
Old January 12th, 2005, 11:24 PM
nofriends's Avatar
nofriends nofriends is offline
Senior Water Wizard
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Aug 2004
Location: Cape Town, RSA
Posts: 10,203 nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)nofriends User rank is Major General (70000 - 90000 Reputation Level)  Folding Points: 189413 Folding Title: Super Ultimate Folder - Level 1Folding Points: 189413 Folding Title: Super Ultimate Folder - Level 1Folding Points: 189413 Folding Title: Super Ultimate Folder - Level 1Folding Points: 189413 Folding Title: Super Ultimate Folder - Level 1Folding Points: 189413 Folding Title: Super Ultimate Folder - Level 1Folding Points: 189413 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 2 Days 8 h 44 m 57 sec
Reputation Power: 767
Hi Bart,

try using this, it should sort out your problem:
Code:
  ************
  
  <% if Results("Categorie") = "Revue der Sporten" or "Sport in Beeld" then %> 
  
     <td width="20%" height="20" valign="top">
     <font color="#888888"><b>Uitgever</b></font>
     </td>
  
  <% elseif Results("Categorie") = "tijdschriften" then %>
  
     <td width="20%" height="20" valign="top">
     <font color="#888888"><b>Nummer</b></font>
     </td>
  
  <% else %>
  
     <td width="20%" height="20" valign="top">
     <font color="#888888"><b>Auteur</b></font>
    </td>
  
  <% end if %>
  
  ************
  


Regards
noFriends

Reply With Quote
  #3  
Old January 13th, 2005, 07:10 AM
stensol stensol is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Netherlands
Posts: 28 stensol User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 9 m 10 sec
Reputation Power: 0
Thnx NoFriends,

I already found that out yesterday, when I saw a post of you in another thread, which I used as a guide.

Plz. have a look at my first thread, the last post, which is my final and last problem with the bookcatalog-script.

Regards,
Bart Stens

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > (2x) If Result = ... Then ... Else ...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek