<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Problem with cfinput autosuggest and cfcomponent</title>
    <link>https://forums.adobe.com/community/coldfusion/coldfusion_advanced?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Wed, 01 Oct 2014 15:36:31 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2014-10-01T15:36:31Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6781087?tstart=0#6781087</link>
      <description>&lt;!-- [DocumentBodyStart:142187d7-4d12-4419-acb9-51248c8223f5] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;blockquote class="jive-quote"&gt;
&lt;p&gt;jackhuang wrote:&lt;/p&gt;
&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is unrelated but in the pages where user have input I put:&lt;/p&gt;
&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&amp;lt;cfset bad_chars="&amp;amp;,&amp;lt;,&amp;gt;,"",&amp;#198;,&amp;#193;,&amp;Acirc;,&amp;#192;,&amp;Aring;,&amp;#195;,&amp;#196;,&amp;#199;,&amp;ETH;,&amp;Eacute;,&amp;Ecirc;,&amp;#200;,&amp;Euml;,&amp;Iacute;,&amp;Icirc;,&amp;Igrave;,&amp;Iuml;,&amp;#209;,&amp;Oacute;,&amp;Ocirc;,&amp;#210;,&amp;#216;,&amp;#213;,&amp;Ouml;,&amp;#222;,&amp;Uacute;,&amp;Ucirc;,&amp;Ugrave;,&amp;#220;,&amp;Yacute;,&amp;aacute;,&amp;acirc;,&amp;aelig;,&amp;agrave;,&amp;aring; ,&amp;#227;,&amp;#228;,&amp;ccedil;,&amp;#233;&amp;ecirc;,&amp;#232;,&amp;#240;,&amp;#235;,&amp;iacute;,&amp;icirc;,&amp;#236;,&amp;iuml;,&amp;#241;,&amp;oacute;,&amp;#244;,&amp;#242;,&amp;#248;,&amp;#245;,&amp;ouml;,&amp;szlig;,&amp;#254;,&amp;#250;,&amp;#251;,&amp;#249;,&amp;uuml;,&amp;#253;,&amp;#255;,&amp;#161;,&amp;pound;,&amp;#164;,&amp;yen;,&amp;#166;,&amp;#167;,&amp;#168;,&amp;#169;,&amp;ordf;,&amp;#171;,&amp;not;,,&amp;reg;,&amp;macr;,&amp;deg;,&amp;plusmn;,&amp;sup2;,&amp;sup3;, &amp;acute;,&amp;micro;,&amp;#182;,&amp;middot;,&amp;#184;,&amp;sup1;,&amp;ordm;,&amp;raquo;,&amp;frac14;,&amp;frac12;,&amp;frac34;,&amp;iquest;,&amp;times;,&amp;#247;,&amp;cent;"&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&amp;lt;cfset good_chars="&amp;amp;amp;,&amp;amp;lt;,&amp;amp;gt;,&amp;amp;quot;,&amp;amp;AElig;,&amp;amp;Aacute;,&amp;amp;Acirc;,&amp;amp;Agrave;,&amp;amp;Aring;,&amp;amp;Atilde;,&amp;amp;Au ml;,&amp;amp;Ccedil;,&amp;amp;ETH;,&amp;amp;Eacute;,&amp;amp;Ecirc;,&amp;amp;Egrave;,&amp;amp;Euml;,&amp;amp;Iacute;,&amp;amp;Icirc;,&amp;amp;Igrave;,&amp;amp;Iuml;,&amp;amp;Nti l de;,&amp;amp;Oacute;,&amp;amp;Ocirc;,&amp;amp;Ograve;,&amp;amp;Oslash;,&amp;amp;Otilde;,&amp;amp;Ouml;,&amp;amp;THORN;,&amp;amp;Uacute;,&amp;amp;Ucirc;,&amp;amp;Ugrave;, &amp;amp; Uuml;,&amp;amp;Yacute;,&amp;amp;aacute;,&amp;amp;acirc;,&amp;amp;aelig;,&amp;amp;agrave;,&amp;amp;aring;,&amp;amp;atilde;,&amp;amp;auml;,&amp;amp;ccedil;,&amp;amp;eacute ; ,&amp;amp;ecirc;,&amp;amp;egrave;,&amp;amp;eth;,&amp;amp;euml;,&amp;amp;iacute;,&amp;amp;icirc;,&amp;amp;igrave;,&amp;amp;iuml;,&amp;amp;ntilde;,&amp;amp;oacute;,&amp;amp;ocirc; , &amp;amp;ograve;,&amp;amp;oslash;,&amp;amp;otilde;,&amp;amp;ouml;,&amp;amp;szlig;,&amp;amp;thorn;,&amp;amp;uacute;,&amp;amp;ucirc;,&amp;amp;ugrave;,&amp;amp;uuml;,&amp;amp;yacut e ;,&amp;amp;yuml;,&amp;amp;iexcl;,&amp;amp;pound;,&amp;amp;curren;,&amp;amp;yen;,&amp;amp;brvbar;,&amp;amp;sect;,&amp;amp;uml;,&amp;amp;copy;,&amp;amp;ordf;,&amp;amp;laquo;,&amp;amp;not; , &amp;amp;shy;,&amp;amp;reg;,&amp;amp;macr;,&amp;amp;deg;,&amp;amp;plusmn;,&amp;amp;sup2;,&amp;amp;sup3;,&amp;amp;acute;&amp;amp;micro;,&amp;amp;para;,&amp;amp;middot;,&amp;amp;cedil;,&amp;amp;s u p1;,&amp;amp;ordm;,&amp;amp;raquo;,&amp;amp;frac14;,&amp;amp;frac12;,&amp;amp;frac34;,&amp;amp;iquest;,&amp;amp;times;,&amp;amp;divide;,&amp;amp;cent;"&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&amp;lt;cfset form.company = replacelist(form.company, bad_chars, good_chars)&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&amp;lt;cfset form.address = replacelist(form.address, bad_chars, good_chars)&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&lt;/td&gt;
&lt;td style=";"&gt;&amp;lt;cfset form.city = replacelist(form.city, bad_chars, good_chars)&amp;gt;....etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;to prevent bad inputs.&amp;nbsp; Is this the right/best way to do this as far as performance is concerned?&lt;/p&gt;

&lt;/blockquote&gt;&lt;p&gt;In my opinion, what you have to get right is the encoding. Use Unicode.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You may be unable to edit this code in an editor that cannot display the characters in the bad_chars string. Use the characters' unicode value to make your code universal. Something like this&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset char_unicode="38,60,62,34,198,193,194,192,197,195,196,199,208,201,202,200,203,205,206,204 ,207,209,211,212,210,216,213,214,222,218,219,217,220,221,225,226,230,224,229,227,228,231,2 33,232,240,235,237,238,236,239,241,243,244,242,248,245,246,223,254,250,251,249,252,253,255 ,161,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,32,181,182,183,184,18 5,186,187,188,189,190,191,215,247,162"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset bad_chars = ""&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfloop list="#char_unicode#" index="u"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfset bad_chars = listAppend(bad_chars, chr(u))&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/cfloop&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:142187d7-4d12-4419-acb9-51248c8223f5] --&gt;&lt;img src='/beacon?t=1415919172812' /&gt;</description>
      <pubDate>Wed, 01 Oct 2014 15:34:13 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6781087?tstart=0#6781087</guid>
      <dc:date>2014-10-01T15:34:13Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6781084?tstart=0#6781084</link>
      <description>&lt;!-- [DocumentBodyStart:dbfc3250-95e5-48e1-8deb-874e9800d05d] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;jackhuang,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Take a look at the &lt;a class="jive-link-external-small" href="https://github.com/misterdai/cfbackport" rel="nofollow"&gt;CF Backport&lt;/a&gt; project, which provides some CF10/11 functions for CF9 (and in some cases, CF8).&amp;nbsp; It includes a backport of EncodeForHTML().&lt;/p&gt;&lt;p&gt;-Carl V.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:dbfc3250-95e5-48e1-8deb-874e9800d05d] --&gt;</description>
      <pubDate>Wed, 01 Oct 2014 15:27:52 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6781084?tstart=0#6781084</guid>
      <dc:date>2014-10-01T15:27:52Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6780479?tstart=0#6780479</link>
      <description>&lt;!-- [DocumentBodyStart:95e64bfc-ccd6-40df-b5cf-057ec54bf8a0] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hi Jackhuang,&lt;/p&gt;&lt;p&gt;It appears Carl has answered your original question. So, please kindly mark the correct answer. It will help others in their search for answers to similar questions. Thank you.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:95e64bfc-ccd6-40df-b5cf-057ec54bf8a0] --&gt;</description>
      <pubDate>Wed, 01 Oct 2014 12:22:41 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6780479?tstart=0#6780479</guid>
      <dc:date>2014-10-01T12:22:41Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6779307?tstart=0#6779307</link>
      <description>&lt;!-- [DocumentBodyStart:6609d9dd-899d-42be-a807-0e452824c7de] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I am using MySql. &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The CF server version is 9 so there is no EncodeForHTML.&lt;span aria-label="Sad" class="emoticon-inline emoticon_sad" style="height:16px;width:16px;"&gt;&lt;/span&gt;&amp;nbsp; I have user who use some characters, I don't know what but could have been a Chinese punctuation mark. It some how include the &amp;gt; sign after a CFINPUT field and took the next &amp;lt;CFINPUT TYPE as part of the value.&amp;nbsp; So when I display the field which now has &amp;gt;&amp;lt;CFINPUT TYPE at the end. It really messes up the page and puts a input box right after the field. &lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:6609d9dd-899d-42be-a807-0e452824c7de] --&gt;</description>
      <pubDate>Wed, 01 Oct 2014 02:11:12 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6779307?tstart=0#6779307</guid>
      <dc:date>2014-10-01T02:11:12Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6779020?tstart=0#6779020</link>
      <description>&lt;!-- [DocumentBodyStart:71247217-bbbc-4f77-99db-31ebf7aaf9cd] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Database indexes may not help with wildcard searches - they really only work in equals or not equals statements. What database are you using?&amp;nbsp; The last several versions of SQL Server support creating full-text indexes on database tables, and then allow you to use the full-text index to quickly search for words within a varchar or nvarchar column (somewhat similar to a LIKE wildcard statement, but performs better).&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;"Bad inputs" is rather subjective, depending on context.&amp;nbsp; It looks like you are trying to replace extended ascii characters with their HTML entity counterparts.&amp;nbsp; There are already functions in ColdFusion that can do this for you.&amp;nbsp; For ColdFusion 10+, look at EncodeForHTML().&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;-Carl V.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:71247217-bbbc-4f77-99db-31ebf7aaf9cd] --&gt;</description>
      <pubDate>Tue, 30 Sep 2014 22:40:11 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6779020?tstart=0#6779020</guid>
      <dc:date>2014-09-30T22:40:11Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6778302?tstart=0#6778302</link>
      <description>&lt;!-- [DocumentBodyStart:dd454a3e-ff9d-4134-9e34-3b4686327185] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Thank you Carl.&amp;nbsp; These are very helpful.&amp;nbsp; Should I be indexing productname to make it "faster"?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This is unrelated but in the pages where user have input I put:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=";"&gt;&amp;nbsp;&amp;nbsp; &lt;/td&gt;&lt;td style=";"&gt; &lt;/td&gt;&lt;td style=";"&gt;&amp;lt;cfset bad_chars="&amp;amp;,&amp;lt;,&amp;gt;,"",&amp;#198;,&amp;#193;,&amp;Acirc;,&amp;#192;,&amp;Aring;,&amp;#195;,&amp;#196;,&amp;#199;,&amp;ETH;,&amp;Eacute;,&amp;Ecirc;,&amp;#200;,&amp;Euml;,&amp;Iacute;,&amp;Icirc;,&amp;Igrave;,&amp;Iuml;,&amp;#209;,&amp;Oacute;,&amp;Ocirc;,&amp;#210;,&amp;#216;,&amp;#213;,&amp;Ouml;,&amp;#222;,&amp;Uacute;,&amp;Ucirc;,&amp;Ugrave;,&amp;#220;,&amp;Yacute;,&amp;aacute;,&amp;acirc;,&amp;aelig;,&amp;agrave;,&amp;aring; ,&amp;#227;,&amp;#228;,&amp;ccedil;,&amp;#233;&amp;ecirc;,&amp;#232;,&amp;#240;,&amp;#235;,&amp;iacute;,&amp;icirc;,&amp;#236;,&amp;iuml;,&amp;#241;,&amp;oacute;,&amp;#244;,&amp;#242;,&amp;#248;,&amp;#245;,&amp;ouml;,&amp;szlig;,&amp;#254;,&amp;#250;,&amp;#251;,&amp;#249;,&amp;uuml;,&amp;#253;,&amp;#255;,&amp;#161;,&amp;pound;,&amp;#164;,&amp;yen;,&amp;#166;,&amp;#167;,&amp;#168;,&amp;#169;,&amp;ordf;,&amp;#171;,&amp;not;,,&amp;reg;,&amp;macr;,&amp;deg;,&amp;plusmn;,&amp;sup2;,&amp;sup3;, &amp;acute;,&amp;micro;,&amp;#182;,&amp;middot;,&amp;#184;,&amp;sup1;,&amp;ordm;,&amp;raquo;,&amp;frac14;,&amp;frac12;,&amp;frac34;,&amp;iquest;,&amp;times;,&amp;#247;,&amp;cent;"&amp;gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=";"&gt;&amp;nbsp;&amp;nbsp; &lt;/td&gt;&lt;td style=";"&gt;&lt;/td&gt;&lt;td style=";"&gt; &amp;lt;cfset good_chars="&amp;amp;amp;,&amp;amp;lt;,&amp;amp;gt;,&amp;amp;quot;,&amp;amp;AElig;,&amp;amp;Aacute;,&amp;amp;Acirc;,&amp;amp;Agrave;,&amp;amp;Aring;,&amp;amp;Atilde;,&amp;amp;Au ml;,&amp;amp;Ccedil;,&amp;amp;ETH;,&amp;amp;Eacute;,&amp;amp;Ecirc;,&amp;amp;Egrave;,&amp;amp;Euml;,&amp;amp;Iacute;,&amp;amp;Icirc;,&amp;amp;Igrave;,&amp;amp;Iuml;,&amp;amp;Ntil de;,&amp;amp;Oacute;,&amp;amp;Ocirc;,&amp;amp;Ograve;,&amp;amp;Oslash;,&amp;amp;Otilde;,&amp;amp;Ouml;,&amp;amp;THORN;,&amp;amp;Uacute;,&amp;amp;Ucirc;,&amp;amp;Ugrave;,&amp;amp; Uuml;,&amp;amp;Yacute;,&amp;amp;aacute;,&amp;amp;acirc;,&amp;amp;aelig;,&amp;amp;agrave;,&amp;amp;aring;,&amp;amp;atilde;,&amp;amp;auml;,&amp;amp;ccedil;,&amp;amp;eacute; ,&amp;amp;ecirc;,&amp;amp;egrave;,&amp;amp;eth;,&amp;amp;euml;,&amp;amp;iacute;,&amp;amp;icirc;,&amp;amp;igrave;,&amp;amp;iuml;,&amp;amp;ntilde;,&amp;amp;oacute;,&amp;amp;ocirc;, &amp;amp;ograve;,&amp;amp;oslash;,&amp;amp;otilde;,&amp;amp;ouml;,&amp;amp;szlig;,&amp;amp;thorn;,&amp;amp;uacute;,&amp;amp;ucirc;,&amp;amp;ugrave;,&amp;amp;uuml;,&amp;amp;yacute ;,&amp;amp;yuml;,&amp;amp;iexcl;,&amp;amp;pound;,&amp;amp;curren;,&amp;amp;yen;,&amp;amp;brvbar;,&amp;amp;sect;,&amp;amp;uml;,&amp;amp;copy;,&amp;amp;ordf;,&amp;amp;laquo;,&amp;amp;not;, &amp;amp;shy;,&amp;amp;reg;,&amp;amp;macr;,&amp;amp;deg;,&amp;amp;plusmn;,&amp;amp;sup2;,&amp;amp;sup3;,&amp;amp;acute;&amp;amp;micro;,&amp;amp;para;,&amp;amp;middot;,&amp;amp;cedil;,&amp;amp;su p1;,&amp;amp;ordm;,&amp;amp;raquo;,&amp;amp;frac14;,&amp;amp;frac12;,&amp;amp;frac34;,&amp;amp;iquest;,&amp;amp;times;,&amp;amp;divide;,&amp;amp;cent;"&amp;gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=";"&gt;&amp;nbsp;&amp;nbsp; &lt;/td&gt;&lt;td style=";"&gt; &lt;/td&gt;&lt;td style=";"&gt;&amp;lt;cfset form.company = replacelist(form.company, bad_chars, good_chars)&amp;gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=";"&gt;&amp;nbsp;&amp;nbsp; &lt;/td&gt;&lt;td style=";"&gt;&lt;/td&gt;&lt;td style=";"&gt; &amp;lt;cfset form.address = replacelist(form.address, bad_chars, good_chars)&amp;gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=";"&gt;&amp;nbsp;&amp;nbsp; &lt;/td&gt;&lt;td style=";"&gt;&lt;/td&gt;&lt;td style=";"&gt; &amp;lt;cfset form.city = replacelist(form.city, bad_chars, good_chars)&amp;gt;....etc.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;to prevent bad inputs.&amp;nbsp; Is this the right/best way to do this as far as performance is concerned?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:dd454a3e-ff9d-4134-9e34-3b4686327185] --&gt;</description>
      <pubDate>Tue, 30 Sep 2014 19:07:12 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6778302?tstart=0#6778302</guid>
      <dc:date>2014-09-30T19:07:12Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6777560?tstart=0#6777560</link>
      <description>&lt;!-- [DocumentBodyStart:518b340e-fbc6-4232-97cf-83e0e9fa20db] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;You don't need the createObject(), since you are calling the component via AJAX (and not actually using the component on the actual page). &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As far as performance, that has more to do with the general speed of your site and especially the code within your CFC.&amp;nbsp; What database platform are you using?&amp;nbsp; How well is it performing?&amp;nbsp; Is the table you are querying properly indexed?&amp;nbsp; Is the database running on the same server as ColdFusion, and does the server have adequate resources to perform (memory, processor speed/cores, etc.)?&amp;nbsp; The performance of &amp;lt;CFINPUT&amp;gt; versus jQuery, Bootstrap, or other autocompletes will likely be pretty similar to each other - it's mostly about how fast the data is transmitted and received from the server-side code via AJAX.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A couple other thoughts.&amp;nbsp; I notice you are using the LIKE operator in your query to do a wildcard search.&amp;nbsp; This is likely necessary for your query, but keep in mind that LIKE will always be slower than an equals comparison. &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Also, instead of looping over the query results, take advantage of built-in functions to accomplish the same thing. So you could replace the entire loop with this:&lt;/p&gt;&lt;p&gt;&amp;lt;cfset myarray = ListToArray( ValueList( getlist.ProductName ) )&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;-Carl V.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:518b340e-fbc6-4232-97cf-83e0e9fa20db] --&gt;</description>
      <pubDate>Tue, 30 Sep 2014 15:25:07 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6777560?tstart=0#6777560</guid>
      <dc:date>2014-09-30T15:25:07Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>6</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6775196?tstart=0#6775196</link>
      <description>&lt;!-- [DocumentBodyStart:550c55bb-5684-4d57-967e-1f52d38664c9] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Also I removed the line:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset suggest = createObject("component", "components.Suggestcfc").init()&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;and it still works.&amp;nbsp; Do I really need that line?&amp;nbsp; I am new to this object oriented programming.&amp;nbsp; Do I have to create the object every time the function is called?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:550c55bb-5684-4d57-967e-1f52d38664c9] --&gt;</description>
      <pubDate>Mon, 29 Sep 2014 21:20:45 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6775196?tstart=0#6775196</guid>
      <dc:date>2014-09-29T21:20:45Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6775193?tstart=0#6775193</link>
      <description>&lt;!-- [DocumentBodyStart:703c78cb-0dd5-4cab-a532-db02adc23c25] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Thank you Carl.&amp;nbsp; The second one worked!&amp;nbsp; Now I have to figure out how to change the ugly blue color hovering over the list....&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I found that the list is pretty slow.&amp;nbsp; I also check the jQuery &lt;a class="jive-link-external-small" href="http://jqueryui.com/autocomplete/#remote" rel="nofollow"&gt;http://jqueryui.com/autocomplete/#remote&lt;/a&gt;&amp;nbsp; but found it extremely slow also.&amp;nbsp; Maybe it's the site. On top of that I do not know I can implement the above using code given there.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I was looking at the twitter typahead at &lt;a class="jive-link-external-small" href="http://twitter.github.io/typeahead.js/examples/" rel="nofollow"&gt;typeahead.js &amp;#8211; examples&lt;/a&gt;&amp;nbsp; which look very promising and fast.&amp;nbsp; But again I don't know how to implement it together with the Coldfusion function that I have created above. &lt;span aria-label="Sad" class="emoticon-inline emoticon_sad" style="height:16px;width:16px;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:703c78cb-0dd5-4cab-a532-db02adc23c25] --&gt;</description>
      <pubDate>Mon, 29 Sep 2014 21:17:35 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6775193?tstart=0#6775193</guid>
      <dc:date>2014-09-29T21:17:35Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6774120?tstart=0#6774120</link>
      <description>&lt;!-- [DocumentBodyStart:7e6fba44-1f6b-4913-8cf9-b6ba1355d28f] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;jackhuang,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you are a new user, I'd suggest you not go down the &amp;lt;CFFORM&amp;gt; and &amp;lt;CFINPUT&amp;gt; path.&amp;nbsp; It is fraught with peril!&amp;nbsp; All of the ColdFusion UI stuff (including &amp;lt;CFFORM&amp;gt; and &amp;lt;CFINPUT&amp;gt;) are built on outdated javascript libraries and do not implement all of the capabilities of those libraries.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;Rather, I suggest you learn a community-supported JavaScript library such as jQuery.&amp;nbsp; It provides fantastic AJAX support and has all the UI features you need, either as part of the core library, the related jQuery UI library, or the myriad of free plug-ins written by 3rd parties.&amp;nbsp; There are other libraries that offer similar functionality too: ExtJS (the CF UI stuff is mostly based on a really old version of ExtJS), Dojo, and several others.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Many experienced developers have consciously moved away from using the built-in ColdFusion UI features due to compatibility issues and functional limitations.&amp;nbsp; Thus, you will be much less likely to get useful assistance with problems you encounter using those features.&amp;nbsp; On the other hand, the community-supported JavaScript libraries have a huge user base (both within and outside the ColdFusion community), and you will undoubtedly be able to get assistance with issues you may encounter.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;All of that said, after reviewing the docs, it looks like you need to change&lt;/p&gt;&lt;!--[CodeBlockStart:1ede6d67-cd7d-48ed-abbc-3143788b171b][excluded]--&gt;&lt;pre class="plain" name="code"&gt;
&amp;lt;cfinput type="text" autosuggest="suggest.getProducts({cfautosuggestvalue})" name="string"&amp;gt;
&lt;/pre&gt;&lt;!--[CodeBlockEnd:1ede6d67-cd7d-48ed-abbc-3143788b171b]--&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;to&lt;/p&gt;&lt;!--[CodeBlockStart:3b4983a9-becb-4e12-8dbd-e7c94d2c4def][excluded]--&gt;&lt;pre class="plain" name="code"&gt;
&amp;lt;cfinput type="text" autosuggest="cfc:suggestcfc.getProducts({cfautosuggestvalue})" name="string"&amp;gt;
&lt;/pre&gt;&lt;!--[CodeBlockEnd:3b4983a9-becb-4e12-8dbd-e7c94d2c4def]--&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;or possibly&lt;/p&gt;&lt;!--[CodeBlockStart:73aed45c-cc20-420d-93be-560aad547eb4][excluded]--&gt;&lt;pre class="plain" name="code"&gt;
&amp;lt;cfinput type="text" autosuggest="cfc:components.suggestcfc.getProducts({cfautosuggestvalue})" name="string"&amp;gt;
&lt;/pre&gt;&lt;!--[CodeBlockEnd:73aed45c-cc20-420d-93be-560aad547eb4]--&gt;&lt;div style="display:none;"&gt;&lt;/div&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Good luck,&lt;/p&gt;&lt;p&gt;-Carl&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:7e6fba44-1f6b-4913-8cf9-b6ba1355d28f] --&gt;</description>
      <pubDate>Mon, 29 Sep 2014 16:45:30 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6774120?tstart=0#6774120</guid>
      <dc:date>2014-09-29T16:45:30Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>9</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Problem with cfinput autosuggest and cfcomponent</title>
      <link>https://forums.adobe.com/message/6772334?tstart=0#6772334</link>
      <description>&lt;!-- [DocumentBodyStart:a3a727b9-5a51-4532-89b1-01ae1b776f3f] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I am new to using cfcomponent and autosuggest.&amp;nbsp; I followed the sample given in the Adobe Help &lt;a class="jive-link-external-small" href="http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a01.html#WSc3ff6d0ea77859461172e0811cbec22c24-720c" rel="nofollow"&gt;Adobe ColdFusion 9 * Using Ajax User Interface Components and Features&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;However, I am not getting the autosuggest to work at all.&amp;nbsp; This is what I did:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;1. I created a Suggestcfc.cfc under a subdirectory called "components" &lt;/p&gt;&lt;p&gt;The Suggestcfc.cfc is as follows:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;lt;cfcomponent output="false"&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cffunction name="getProduct" access="remote" returntype="array" output="false"&amp;gt;&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfargument name="suggestvalue" required="true"&amp;gt; &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfset var myarray = ArrayNew(1)&amp;gt; &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfquery datasource="mydatabase"&amp;nbsp; name="getlist"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT DISTINCT productname FROM products&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE productname LIKE &amp;lt;cfqueryparam value="#suggestvalue#%" cfsqltype="cf_sql_varchar"&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/cfquery&amp;gt; &lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfloop query="getlist"&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfset arrayAppend(myarray, productname)&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/cfloop&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfreturn myarray&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/cffunction&amp;gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cffunction name="init" output="false"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;cfreturn this&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/cffunction&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/cfcomponent&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;2. I have a test.cfm as:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;lt;html xmlns="&lt;/span&gt;&lt;a class="jive-link-external-small" href="http://www.w3.org/1999/xhtml" rel="nofollow"&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;&lt;span&gt;"&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;head&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/head&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;body&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfset suggest = createObject("component", "components.Suggestcfc").init()&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfform&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;cfinput type="text" autosuggest="suggest.getProducts({cfautosuggestvalue})" name="string"&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/cfform&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/body&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;/html&amp;gt;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So when I run the test.cfm it only showed a box and when I started typing, nothing is being suggested (retrieve from the products table).&amp;nbsp; What am I doing wrong here?&amp;nbsp; Any help is appreciated.&amp;nbsp; Thanks in advance.&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:a3a727b9-5a51-4532-89b1-01ae1b776f3f] --&gt;</description>
      <pubDate>Mon, 29 Sep 2014 04:37:16 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6772334?tstart=0#6772334</guid>
      <dc:date>2014-09-29T04:37:16Z</dc:date>
      <clearspace:dateToText>1 month 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>10</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

