• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to compare a database field and form field and highlight differences

New Here ,
May 11, 2010 May 11, 2010

Copy link to clipboard

Copied

Hi there,

I have been trying to find a coldfusion function that will help, I have tried comparing two strings but the results of -1 1 or 0 aren't very useful.

I need to compare a database field with a form field and highlight all the differences in the form field in red.

Thanks

Katie

Views

319

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 11, 2010 May 11, 2010

Copy link to clipboard

Copied

LATEST

This is a non-trivial process.  Rather than doing a compare, you really are wanting to do a diff.  CF doesn't do this out of the box, but you might want to have a sniff around on Google to see if anyone has implemented anything for CF.

Some reading:

http://en.wikipedia.org/wiki/Diff#Algorithm

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation