Note that there are some explanatory texts on larger screens.

plurals
  1. POColdfusion and Jquery results table formatting
    primarykey
    data
    text
    <p>I am using Coldfusion 9 and Sql Server 2008 r2. I am trying to use this live search which displays results.</p> <p>Original Post is : <a href="http://www.raymondcamden.com/index.cfm/2011/2/1/Using-jQuery-to-search-against-different-types-of-content" rel="nofollow noreferrer">http://www.raymondcamden.com/index.cfm/2011/2/1/Using-jQuery-to-search-against-different-types-of-content</a> </p> <p>I want to add a table to this, so I can get it to format. Any help will be great. </p> <p>This is the Search.cfm</p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function() { //http://stackoverflow.com/questions/217957/how-to-print-debug-messages-in-the-google-chrome-javascript-console/2757552#2757552 if (!window.console) console = {}; console.log = console.log || function(){}; console.dir = console.dir || function(){}; //listen for keyup on the field $("#searchField").keyup(function() { //get and trim the value var field = $(this).val(); field = $.trim(field) //if blank, nuke results and leave early if(field == "") { $("#results").html(""); return; } console.log("searching for "+field); $.getJSON("test.cfc?returnformat=json&amp;method=search", {"search":field}, function(res,code) { var s = ""; s += "&lt;h2&gt;Results&lt;/h2&gt;"; for(var i=0; i&lt;res.fd_table.length; i++) { s += "&lt;p&gt;&lt;b&gt;uid:"+res.fd_table[i].fd_uid+"&lt;/b&gt;&lt;br/&gt;Device: "+res.fd_table[i].fd_dev + "&lt;br/&gt;"; } $("#results").html(s); }); }); }) </code></pre> <p></p> <pre><code>&lt;form&gt; Search: &lt;input type="text" name="search" id="searchField"&gt; &lt;/form&gt; &lt;div id="results"&gt;&lt;/div&gt; </code></pre> <p>Demo From the original post <a href="http://www.coldfusionjedi.com/demos/feb12011/test.cfm" rel="nofollow noreferrer">http://www.coldfusionjedi.com/demos/feb12011/test.cfm</a></p> <p>This is the end result I am trying to achieve. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload