it's a technique I used to show the same file several ways... one is directly into excel, the other was as a html table and now as javascript data.
Fun stuff... I like re-using content, imagine if the data was large, and already in the cache, a quick right click to save the file already has the data in the cache! the code was slapped together, it was just the technique that I felt is often overlooked for the lightest weight solution for large data sets. I know you can use the technique (and not the little plugin) to lighten the load! On 3/8/07, Daemach <[EMAIL PROTECTED]> wrote: > > I understand now and thanks for the script. That would reduce the size of > the download somewhat. > > As a reference, the json ser/deser component we use in cold fusion defines a > recordset object as a set of arrays. This is to keep with the wddx > standard, though it differs slightly by sticking all of the columns under a > data node rather than in the root. > > query.columnlist // [col1,col2] > query.recordcount // 2 > query.data // contains arrays of columns > query.data.col1 = [col1row1,col1row2] > query.data.col2 = [col2row1,col2row2] > > so if my columns were name and email, to get the 5th email record it would > be query.data.email[4]. to loop over a column (to search it perhaps) would > be: > > for (i in query.data.col1){ > if (i.indexOf("whatever") != -1) do something; > } > > > > > Ⓙⓐⓚⓔ wrote: > > > > it's similar to Json, but no field names that get repeated for each > > record. > > > > you do an ajax request , get the response and split it with "\n", now > > you have an array of records, then you split each record with "\t" and > > you've got a 2 dimensional array.. all the data in perhaps half the > > size. > > > > if you really want it as an array of objects you need a header record, > > which gets split with "/t" then loop thru it assigning the array > > elements to an object field. > > > > Does this sound like what you would need for extra light weight > > transport? I could draft a plugin, it's not rocket surgery! > > > > > > On 3/8/07, Daemach <[EMAIL PROTECTED]> wrote: > >> > >> Jake, you are famous for this ;) > >> > >> Sounds great in theory but an example of how to accomplish this and the > >> reasoning behind that claim would be very helpful! > >> > >> I meant lightweight in terms of querying more than page size, by the way. > >> I > >> should have been more clear. > >> > >> > >> > >> Ⓙⓐⓚⓔ wrote: > >> > > >> > if you're pushing the limit for 'light weight', consider simple tab > >> > delimited data! a simple header and you can convert it to Javascript > >> > in a few lines of code! Not as easy as an eval, but the speed will be > >> > worth it! > >> > > >> > On 3/8/07, Daemach <[EMAIL PROTECTED]> wrote: > >> >> > >> >> While discussing json support in Cold Fusion with Rey Bango, I had a > >> >> small > >> >> flash of insight. It's a pretty easy matter to take a recordset or > >> any > >> >> other structure, serialize it to JSON format and output that string > >> >> inside > >> >> of an eval() directly in the HTML itself. With jQuery and the ready() > >> >> function when the page loads you could have a client-side dataset > >> ready > >> >> to > >> >> go. Why make ajax calls when you can query a client-side datasource > >> for > >> >> things like an auto-complete list? > >> >> > >> >> So the questions are: > >> >> > >> >> -- What are the limits the browser can handle in terms of record count > >> >> and > >> >> still retain a lightweight feel? (depends on RAM, processor speed - I > >> >> know, > >> >> but generally...) > >> >> -- What would the optimal structure look like for searching given a > >> >> function > >> >> like an auto-complete form field? > >> >> -- Is a "for in" loop the best way to query or is there something more > >> >> efficient? > >> >> -- What benefits, if any, would this have for filtering/sorting a > >> table? > >> >> > >> >> Or is this a bad idea to start with? Obviously ajax still has its > >> place, > >> >> but it seems like this concept might work for some things... > >> >> -- > >> >> View this message in context: > >> >> > >> http://www.nabble.com/Querying-javascript-datasources---what-factors-improve-speed-efficiency--tf3373312.html#a9387190 > >> >> Sent from the JQuery mailing list archive at Nabble.com. > >> >> > >> >> > >> >> _______________________________________________ > >> >> jQuery mailing list > >> >> discuss@jquery.com > >> >> http://jquery.com/discuss/ > >> >> > >> > > >> > > >> > -- > >> > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > >> > _______________________________________________ > >> > jQuery mailing list > >> > discuss@jquery.com > >> > http://jquery.com/discuss/ > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Querying-javascript-datasources---what-factors-improve-speed-efficiency--tf3373312.html#a9387322 > >> Sent from the JQuery mailing list archive at Nabble.com. > >> > >> > >> _______________________________________________ > >> jQuery mailing list > >> discuss@jquery.com > >> http://jquery.com/discuss/ > >> > > > > > > -- > > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > > _______________________________________________ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > > > -- > View this message in context: > http://www.nabble.com/Querying-javascript-datasources---what-factors-improve-speed-efficiency--tf3373312.html#a9388247 > Sent from the JQuery mailing list archive at Nabble.com. > > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/