Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1876351.4oM7Z9lvqd@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Mon, 08 Oct 2012 03:26:15 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <2610175.x4FWaXcEle@PointedEars.de> <7238984.617k9mAqVa@PointedEars.de> <3592620.Gox2ZXX9UI@PointedEars.de> <6035717.rH6HMBR8Db@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 45 NNTP-Posting-Date: 08 Oct 2012 03:26:16 CEST NNTP-Posting-Host: 87dfd5f8.newsspool2.arcor-online.net X-Trace: DXC=llBn[j>_2`2n`gW2MTm]<3A9EHlD;3Yc24Fo<]lROoR18kFK040i@2K255T;Q:B6AfbRZF= X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:16458 Patricia Shanahan wrote: > […] Suppose a JS+HTML application were to exist that had tabular data in > JavaScript data structures, and needed to transfer it to a spreadsheet on > a workstation without using any special server set-up. What would be the > best ways to do it? That depends. In addition to the already discussed solutions, with client-side scripting data can be collected and stored locally on the mobile device, with cookies or DOM Storage (DOM Storage works best with file:// equivalents, non-trivial data structures and larger amounts of data). It can be transferred from that storage to a common data base (not necessarily: database) or *perhaps* (I have not tried that yet) accessed from the workstation directly, when both the mobile device and the workstation are within the same network again or are otherwise connected to each other (cloud storage comes to mind; I have not tried that yet either, but as long as it supports HTTP access that could be feasible). I have updated my testcase to show how Local Storage works on mobile devices both with http:// and file:// equivalents But a Thick Client Web application (in an HTML document in a Web browser) is capable of displaying those spreadsheets and charts by itself, so transferring the data might not be necessary in the first place. > The simplest and most general solution I have thought of is to display > the data as CSV text, so that the user can select and copy it to the > clipboard. From there, they can do all sorts of things with it, subject > only to device limitations, including pasting it into the body of an > e-mail, or, pasting it into a text editor window and saving it, as a > .csv file, on a thumb drive. That is another option. You can also generate and process JSON or XML, with the additional advantage of transferring more structured information. PointedEars -- Sometimes, what you learn is wrong. If those wrong ideas are close to the root of the knowledge tree you build on a particular subject, pruning the bad branches can sometimes cause the whole tree to collapse. -- Mike Duffy in cljs,