Solved

Compare search results page

Posted on 2004-08-25
6
136 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Coldfusion Datefield problem 2 124
cookies analysis tools 2 106
Setting Up Local Lan Web Server 1 77
Problem to copy file 14 49
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.

756 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