Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!ecngs!testfeeder.ecngs.de!46.4.82.166.MISMATCH!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: How to pass a php variable to a javascript file (function)? Date: Sat, 03 Oct 2015 20:34:16 +0200 Organization: PointedEars Software (PES) Lines: 29 Message-ID: <2001160.vPYRIAvtoo@PointedEars.de> References: <1739227.XXYPReGQTy@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1443897257 7317 eJwFwQERADEIAzBLcKyFyeEZ9S/hEwSdk4fggaBG9/VgVbEC1H47Oaz23PsoC9m+1KzSxn4f8xGp (3 Oct 2015 18:34:17 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sat, 3 Oct 2015 18:34:17 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwNyrkBwDAIBLCVwnfAOGDM/iPEnQqZgHBcYVBbWxc9pJp9yzDplF39zsNWx4eRYRMlnii5xzLascWSy73xA0GoFUA= Cancel-Lock: sha1:Q1DGMGFe2WUNh49W7orY7p6kSyA= X-NNTP-Posting-Host: eJwFwQcBwEAIBDBLZRxQOUz/Ej6BGFm7GkxxuC0OiKeC0qOndmKzwsEWTDNaU7xXcv933A8qahHz Xref: csiph.com comp.lang.javascript:28807 Joao Rodrigues wrote: > Thomas 'PointedEars' Lahn wrote: >> Stefan Weiss wrote: >>> […] if we knew that `some_string` is relatively short, we could suggest >>> passing it along to index.html in the query string. >>> >>> location.href = "index.html?s=" + encodeURIComponent(some_string); >>> >>> […] >> >> It is important to emphasize “relatively short”, because this approach is >> subject to IE URL length limits which can be easily exceeded if the >> argument to encodeURIComponent() contains Unicode characters with code >> points beyond the US-ASCII range (as URI percent-encoding is UTF-8 >> based). > > I wouldn't say it is easy to exceed the 2083 characters limit in IE, > which applies to older versions. […] You are misinformed. See pp. for details. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.