Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <680559024.28dSeFvmuz@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sun, 17 Feb 2013 13:18:24 +0100 User-Agent: KNode/4.8.5 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+&. <1605051.1mSJY5JTrl@PointedEars.de> <79CdndDtp9VePL3MnZ2dnUVZ5radnZ2d@giganews.com> MIME-Version: 1.0 Lines: 86 NNTP-Posting-Date: 17 Feb 2013 13:18:30 CET NNTP-Posting-Host: b4be7b26.newsspool2.arcor-online.net X-Trace: DXC=SV[468^I>V]HigV@eW57PQA9EHlD;3YcR4Fo<]lROoRQ8kFYBYU3JEo]jMB51SCGIA[ X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:18520 Robert Crandal wrote: > "Thomas 'PointedEars' Lahn" wrote in message > news:1605051.1mSJY5JTrl@PointedEars.de... It is supposed to be an attribution _line_, not a novel. >> Robert Crandal wrote: >> > >> There is no Javascript. But with an ECMAScript implementation such as >> JavaScript you can, in a sufficiently recent Web browser, use an >> implementation of the XMLHttpRequest API. > > Our computer runs Windows 7 and I believe our main web browser is > Internet Explorer 8.0. It SHOULD be Internet Explorer 9 or later. > Do you think are Web browser is recent enough? Yes. > Is it possibly already equipped with this XMLHttpRequest API that you > mention? Yes. However, it is necessary to use the older ActiveX/COM variant there to access local files via “file://…” URIs. JSX:http.js automatically uses that variant there, then. >> That API, with sufficient permissions granted, allows you to GET listings >> of (local) files (the format will vary between UAs) and to GET the file >> contents via URIs. Having the files' content, you can build from that an >> index as an Object instance (preferably with empty prototype chain, or a >> collision-avoiding Map implementation such as JSX:map.js) that ultimately >> maps words (property names) to a list of files that contain them >> (references to Array instances of file names, as property values). [As >> an optimization, a previous object could also map prefixes to words.] >> >> You can store that index in serialized form in Local Storage and from >> that point forward only use the unserialized form of the index to perform >> the search until the index needs to be updated. > > Do you know where I can get a very simple example that demonstrates > how to GET listings of local files? Yes. > How about a simple example of how to GET the file contents via URIs?? > I understand many programming concepts, but I'm unfamiliar with this Web > API that you mention. Google is your friend. [psf 6.1] >> As an alternative, you can use other software to build a script resource >> with the index as an Object instance that you use for searches after you >> loaded that resource from an HTML document. An example of that can be >> found >> in SELFHTML's offline search; the code quality thereis is awful, but >> debugging that code could still help. Probably there are other, better >> implementations as this is not likely to be an uncommon problem. > > Most of the online documentation for SELFHTML that I found is printed > in the German language, which I can't read, hehe. Last I checked there was a version of SELFHTML in English and other languages, there are online translators like Google Translate which provide a sufficiently exact translation, and the relevant source code is not in German. > I doubt we'd be able to install software on this computer anyways. 8( AISB, the alternative approach used in SELFHTML is to use software other than a client-side ECMAScript implementation to generate the index on a computer where you can install software, and use that index on another computer where you can not necessarily install software. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.