Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <7380843.eiFL6tTcTp@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sat, 10 Nov 2012 10:23:50 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 30 NNTP-Posting-Date: 10 Nov 2012 10:23:51 CET NNTP-Posting-Host: e8c8ef67.newsspool2.arcor-online.net X-Trace: DXC=5>aK`M=DB64g7VT`4AI\omSTE9d X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:17114 Cezary Tomczyk wrote: > W dniu 2012-11-09 14:53, Asen Bozhilov pisze: >> Cezary Tomczyk wrote: >>> According to "Better not use eval() because ... ": >>> >>> How to use eval in a correct way? >>> >>> For example when I'll get the JavaScript (or any other EcmaScript >>> implementation) code through XMLHttpRequest then how to safely eval the >>> code? >> >> Your question skips your intentions of using `eval'. Without them, it >> is almost impossible to tell you what is the correct way to use >> `eval`. Now every usage of `eval` seems wrong. You should be more >> concrete about it. > > Right. I would like to get data from server using XMLHttpRequest and > then, based on header from server response and data type, parse and run > JavaScript code. The recommended approaches depend on the data. PointedEars -- var bugRiddenCrashPronePieceOfJunk = ( navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1 ) // Plone, register_function.js:16