Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #10456

Re: read get variables and show/hide div

Message-ID <1917513.ZmKo30s5rG@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2012-01-21 22:17 +0100
Subject Re: read get variables and show/hide div
Newsgroups comp.lang.javascript
References <33182896-a3fa-463b-8bd0-bb14a17e962b@4g2000pbz.googlegroups.com> <t77hh7lcrk9c38ajbt7f295fi0vc99ftv3@4ax.com> <423fce4d-72bc-442d-bd22-8d5b90459545@iu7g2000pbc.googlegroups.com> <ba2ih7lkpg7ee01e5dtu79puq9o2hfscom@4ax.com>
Followup-To comp.lang.javascript

Followups directed to: comp.lang.javascript

Show all headers | View raw


Jeff North wrote:

> The $_GET function is throwing an error which in turn prevents all the
> other scripts from running. Try replacing the current $_GET function
> with
> function $_GET(q,s) {
> var res = new Array();
> s = (s != null) ? s : window.location.search;
> var re = new RegExp("("+q+"[ |=])(.*?)(?=&|$)","i");
> var result = s.match(re);
> return (result == null ) ? '' : result[2];
> }
> 
> Another problem is that you are not calling the $_GET function so
> there is no-way that it is going to be executed. You need to add:
> if( $_GET('email') != '' ) closediv();
> just after the $_GET function.

Potentially confusing and harder-to-maintain results of such identifier 
abuse were probably one reason why ECMAScript Edition 3 contained a note 
that identifiers starting with `$' should be machine-generated.

Please do not do that.


PointedEars
-- 
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
  -- Richard Cornford, cljs, <cife6q$253$1$8300dec7@news.demon.co.uk> (2004)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

read get variables and show/hide div cerr <ron.eggler@gmail.com> - 2012-01-19 14:17 -0800
  Re: read get variables and show/hide div Jeff North <jnorthau@yahoo.com.au> - 2012-01-20 09:57 +1100
    Re: read get variables and show/hide div cerr <ron.eggler@gmail.com> - 2012-01-19 15:32 -0800
      Re: read get variables and show/hide div Jeff North <jnorthau@yahoo.com.au> - 2012-01-20 18:13 +1100
        Re: read get variables and show/hide div Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-21 22:17 +0100

csiph-web