Question

I'm getting this error in the Chrome console when I click into the +1 Google button on my web application:

Uncaught TypeError: Object [object global] has no method '__initBubble'

When I click on Firefox I'm getting this one with Firebug console:

GET https://apis.google.com/_/scs/apps-static/_/js/k...oA8JI/rt=j/rs=AItRSTM1CRWVBre780vPJIUtIKP84_w5jA  200 OK  52ms  rs=AIt...84_w5jA (línea 338)
Cannot resize already-closed iframe I1_1386355082729.

I've just added the next HTML:

<div id="googlemas">
<div class="g-plusone" style="display: clear" data-annotation="none" data-width="200" data-href="https://itransformer.es"></div>

and the next Javascript snippet code:

<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/platform.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

When I click on the button, it turns into this:

Google+ button

and the +1 is not added.

I've tried removing the styles and all the attributes except the data-href one, but always the same error.

Any suggestion of what I am doing wrong?

Update: Solved

The error was due to a bad value on data-href. I had "https" instead of "http".

Était-ce utile?

La solution

The error was due to a bad value on data-href. I had "https" instead of "http".

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top