Solved

Compare search results page

Posted on 2004-08-25
6
131 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Nginx CDN 12 114
PHP in Apache server 20 81
Configure a Local PHP Interpreter for Phpstorm 2 119
Question to locate the problem 18 55
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now