Re: Passing MULTIPLE values using URL string
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Sun, 30 Sep 2007 16:21:47 +0200
Safalra (Stephen Morley) wrote:
On Sun, 30 Sep 2007 14:03:11 +0200, Thomas 'PointedEars' Lahn wrote:
Safalra (Stephen Morley) wrote:
Something like this will extract the query parameters into anIt is well-known that host objects should not be augmented as their
convenient structure:
http://www.safalra.com/programming/javascript/get-data/
You can then use window.location.get.Trouwdd and
window.location.get.Naam.
existence is not guaranteed and their behavior for adding properties is
not defined by the language standard. Therefore, using that code is
very unwise.
I've never heard of this 'well-known' problem before.
Which means you are not quite experienced enough. It has been discussed
here numerous times already.
If window.location doesn't exist then any code attempting to access
window.location.search won't work anyway.
That is true in *this* case.
Is there any current JavaScript-capable browser in which you can't add
properties in this way (if there is then I'll make the effort to
distinguish between the de facto and de jure standards)?
It really doesn't matter whether or not such a HTML UA (not only a browser)
can be named by anyone. Programming in a way that is specified to be
error-prone (see ES3, 8.6.2 §8) is irresponsible, incompetent Voodoo
programming. Especially because there is an easy way that makes the
error-prone approach unnecessary. For example:
http://PointedEars.de/scripts/search.js
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
.
- References:
- Re: Passing MULTIPLE values using URL string
- From: timsamshuijzen
- Re: Passing MULTIPLE values using URL string
- From: Safalra (Stephen Morley)
- Re: Passing MULTIPLE values using URL string
- From: Thomas 'PointedEars' Lahn
- Re: Passing MULTIPLE values using URL string
- From: Safalra (Stephen Morley)
- Re: Passing MULTIPLE values using URL string
- Prev by Date: Re: Calculating e^e in Javascript.
- Next by Date: Re: creating a 'help' function
- Previous by thread: Re: Passing MULTIPLE values using URL string
- Next by thread: function declaration semantics.
- Index(es):
Relevant Pages
|