AddThis button ('addthis_counter') dissapears

bublible Apr 15, 2012 09:57AM EDT

I have some strange problem: I have defined my addthis to be created at runtime (as I am using dynamic pages using jQuery so the url links to buttons are dynamicaly updated) and everything is OK except that AddThis Button (the orange one with counter above) dissapears after initial loading of the page, I mean as soons as I click any menu button this particular buton doesn't show up anymore although every other buttons do - why is this, can anyone help, please?

BTW: using Firebug in HTML window it shows that when everything is OK the html code for addthis_counter is showed normal, but when it dissapears the same code is there but greyed and I also noticed that another difference is that when it is greyed it has missing "href='#'" part in it. So I put it by hand to my code thi9nking that maybe that was the problem but nop: the problem is still there, still greyed even with the href="#" manualy edited. :-(((

If I could I would upload screenshots of "ok status" and "error status" but do not know how to...

Up 0 Rated Down
bublible Apr 15, 2012 10:43AM EDT
...ok, I uploaded it to ImageShack:

this is when it is OK
<a href="http://img38.imageshack.us/i/addthiscounterok.jpg/" target="_blank"><img src="http://img38.imageshack.us/img38/8421/addthiscounterok.th.jpg" alt="Free Image Hosting at www.ImageShack.us" border="0"/></a>

and this one when it dissappears from the webpage
<a href="http://img607.imageshack.us/i/addthiscounterbad.jpg/" target="_blank"><img src="http://img607.imageshack.us/img607/7434/addthiscounterbad.th.jpg" alt="Free Image Hosting at www.ImageShack.us" border="0"/></a>
Up 0 Rated Down
bublible Apr 15, 2012 11:05AM EDT
+ ...this is the runtime js code that draws those buttons:


<?php
// NACITA (VCLENI DO TOHOTO SCRIPTU) OBSAH INEHO EXTERNEHO PHP SCRIPTU
include '_konstanty.php';

?>
<div id="addthis">
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-***number_here*****"></script>
<div id="atbtns" class="addthis_toolbox addthis_default_style addthis_16x16_style"></div>
<script type="text/javascript">

//
var tbx = document.getElementById('atbtns');

//
tbx.innerHTML += '<span class="addthis_separator" style="color:#CCCCCC; margin-top:-2px;"> | </span>';
tbx.innerHTML += '<a class="addthis_button_email" title="<?= iconv('windows-1250', WWW_PAGE_ENCODING, WWW_BTN_EMAIL_TITLE) ?>"</a>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<a class="addthis_button_facebook"></a>';
tbx.innerHTML += '<a class="addthis_button_facebook_like" style="margin-top:-45px;" fb:like:href="<?= $_sub ?>" fb:like:layout="box_count"></a>';
tbx.innerHTML += '<a class="addthis_button_tweet" style="margin-top:-45px;" tw:url="<?= $_sub ?>" tw:count="vertical"></a>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<a class="addthis_button_tweetmeme" style="margin-top:-45px;" tm:url="<?= $_sub ?>"></a>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<a class="addthis_button_google_plusone" style="margin-top:-45px;" g:plusone:href="<?= $_sub ?>" g:plusone:size="tall"></a>';
tbx.innerHTML += '<span class="addthis_separator">&nbsp;</span>';
tbx.innerHTML += '<a class="addthis_counter" style="margin-top:-45px; display:block;" href="#"></a>';

//
addthis.toolbox('#atbtns');
</script>
</div>

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Still need help?


General Topics

 

Developers