Hello,
I'm using ajax.updater of prototype framework to call upon an html page to load in my DIV. The html page that i'm calling upon has another script on it, i.e. AddThis button (http://www.addthis.com)...on it's own the page works fine, but when i call upon it, AddThis Button doesn't work.
Below is the portion of the code where ajax.updater is being used...I tried reading prototype documentation and follow other samples that i've found online...but nothing.
Ajax.updater:
AddThis button:Code:<script> function updateWithFile(file){ var url = file; var pars = ''; var myAjax = new Ajax.Updater( 'glow', url, {method: 'post', parameters: pars, evalScripts: ''}); } addEvent(window, 'load', function() { updateWithFile('home.html') }); function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } var myGlobalHandlers = { onCreate: function(){ Element.show('loadingdiv'); }, onComplete: function() { if(Ajax.activeRequestCount == 0){ Element.hide('loadingdiv'); } } }; Ajax.Responders.register(myGlobalHandlers); </script>
Thank you very much in advance.Code:<td><!-- ADDTHIS BUTTON BEGIN --> <script type="text/javascript"> addthis_pub = 'account name has been hidden'; addthis_logo = 'hidden images/add_logo.png'; addthis_logo_background = 'EFEFFF'; addthis_logo_color = '666699'; addthis_brand = 'Branding name'; addthis_options = 'favorites, email, digg, delicious, myspace, facebook, google, live, more'; </script> <a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="image used as a button goes here" width="164" height="101" border="0" alt="" /></a> <script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script> <!-- ADDTHIS BUTTON END -->


Reply With Quote

Bookmarks