You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Henry Saputra <he...@gmail.com> on 2012/06/20 20:14:40 UTC

Why is the gadgets.util.getUrlParameters "var parameters" has already set when first called?

Hi Guys,

Been trying to figure out why gadgets.util.getUrlParameters call
always return empty object. Looks like the global var used to cache it
being set already.

So the check

gadgets.util.getUrlParameters = function(opt_url) {
    var no_opt_url = typeof opt_url === 'undefined';
    if (parameters !== null && no_opt_url) {
      // "parameters" is a cache of current window params only.
      return parameters;
    }

....


Always return empty object.

Been trying to debug this but couldnt figure out when its set.


- Henry

Re: Why is the gadgets.util.getUrlParameters "var parameters" has already set when first called?

Posted by Ryan J Baxter <rj...@us.ibm.com>.
I find this is a common problem when working in Shindig :)

-Ryan




From:   Henry Saputra <he...@gmail.com>
To:     dev@shindig.apache.org, 
Date:   06/20/2012 07:58 PM
Subject:        Re: Why is the gadgets.util.getUrlParameters "var 
parameters" has already set when first called?



Never mind, I think I am losing my mind =P

False alarm =)

- Henry

On Wed, Jun 20, 2012 at 11:14 AM, Henry Saputra <he...@gmail.com> 
wrote:
> Hi Guys,
>
> Been trying to figure out why gadgets.util.getUrlParameters call
> always return empty object. Looks like the global var used to cache it
> being set already.
>
> So the check
>
> gadgets.util.getUrlParameters = function(opt_url) {
>    var no_opt_url = typeof opt_url === 'undefined';
>    if (parameters !== null && no_opt_url) {
>      // "parameters" is a cache of current window params only.
>      return parameters;
>    }
>
> ....
>
>
> Always return empty object.
>
> Been trying to debug this but couldnt figure out when its set.
>
>
> - Henry



Re: Why is the gadgets.util.getUrlParameters "var parameters" has already set when first called?

Posted by Henry Saputra <he...@gmail.com>.
Never mind, I think I am losing my mind =P

False alarm =)

- Henry

On Wed, Jun 20, 2012 at 11:14 AM, Henry Saputra <he...@gmail.com> wrote:
> Hi Guys,
>
> Been trying to figure out why gadgets.util.getUrlParameters call
> always return empty object. Looks like the global var used to cache it
> being set already.
>
> So the check
>
> gadgets.util.getUrlParameters = function(opt_url) {
>    var no_opt_url = typeof opt_url === 'undefined';
>    if (parameters !== null && no_opt_url) {
>      // "parameters" is a cache of current window params only.
>      return parameters;
>    }
>
> ....
>
>
> Always return empty object.
>
> Been trying to debug this but couldnt figure out when its set.
>
>
> - Henry