Solved

Compare search results page

Posted on 2004-08-25
6
134 Views
Last Modified: 2013-12-24
1.   Next to each results on my search page is a check box.
2.   If a user selects at least two boxes, then clicks a button at the bottom called "Compare".
3.   Clicking on the "Compare" button should take them to a split page that has details of both selected records.

I see this feature often on the web. Just not sure how it can be accomplished in coldfusion. Any suggestions?
0
Comment
Question by:thomasgroup
  • 2
6 Comments
 
LVL 21

Expert Comment

by:pinaldave
ID: 11895013
yes you can.
1) you can pass the parameters in the form and bring to next page
2) the page has loop over table column ...
i) loop over the number of the variables passed..if two checkbox then two column
ii) then loop over query and bring their info back from database
iii) display them together

this will be big loop with
column, query, display ...
this way you can do as many as you want...
Regards,
---Pinal
0
 

Author Comment

by:thomasgroup
ID: 11895259
That sounds excatly what I need. This may be too much... but can i see a example of the page that does the cfloop? thx
0
 
LVL 21

Expert Comment

by:pinaldave
ID: 11895279
well... i do not have example on hand but this is architecture you can use it.
0
 
LVL 17

Accepted Solution

by:
Tacobell777 earned 300 total points
ID: 11897817
use this function

<cfscript>
function fnModified( unmodified, modified )
{
      var stringReturn = '';
      unmodified = trim(arguments.unmodified);
      modified = trim(arguments.modified);
      if ( compareNoCase(unmodified, modified) EQ 0 )
      {
            stringReturn = unmodified;
      }
      else
      {
            stringReturn =  "[original] ";
            if ( arguments.unmodified IS "" )
            {
                  stringReturn = stringReturn & "(NULL)";
            }
            else
            {
                  stringReturn = stringReturn & "<span style='color: gray; font-weight: normal;'>#arguments.unmodified#</span>";
            }
            stringReturn = stringReturn & "<br>[edited] <span style='color: red;'>" & arguments.modified & "</span> ";
      }
      return stringReturn;
}
</cfscript>

it works like this

#fnModified( "test1", "test2" )#

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question