Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!news.chainon-marquant.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <1855899.XyKBKyFPRe@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sat, 22 Oct 2011 21:22:57 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit Subject: Re: Get value of named object Newsgroups: comp.lang.javascript References: <8927386.SEqChMirdb@PointedEars.de> <3016a7h721gekekruu1hmbiqv1p0vmsd67@4ax.com> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 27 NNTP-Posting-Date: 22 Oct 2011 21:22:58 CEST NNTP-Posting-Host: e71468a5.newsspool1.arcor-online.net X-Trace: DXC=>f4fUHkGUSWaoembcbF;DQic==]BZ:af^4Fo<]lROoRQ<`=YMgDjhgR3:^P=7BE@=PDZm8W4\YJN\b@mF9jNikdU_dXMBNGELEQ4A=7_MSX8^Q X-Complaints-To: usenet-abuse@arcor.de Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:7624 Swifty wrote: > Thomas 'PointedEars' Lahn wrote: >> (Your current show() would still cause document.write() to be called >> consecutively, which is a bad idea.) > > And there I was, congratulating myself on having very nearly written > an entire page in JavaScript. One step at a time. > > The page is half learning exercise, half reference for properties that > interest me, and which I may eventually use somewhere. If it is supposed to be a learning exercise, then you have slept right through it. In essence: 1. Avoid using eval(). Use property access syntax instead. 2. Do not call document.write() consecutively. Pass it a string value (or a value convertible to a string) that you build before. PointedEars -- Anyone who slaps a 'this page is best viewed with Browser X' label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network. -- Tim Berners-Lee