Solved

Compare search results page

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

20 Experts available now in Live!

Get 1:1 Help Now