Results 1 to 3 of 3

Thread: [RESOLVED] - noob question- Ajax.updater & other scripts - PLS help

  1. #1
    Join Date
    Aug 2008
    Chicago, IL

    resolved [RESOLVED] - noob question- Ajax.updater & other scripts - PLS help


    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.


    	function updateWithFile(file){
    		var url = file;
    		var pars = '';
    		var myAjax = new Ajax.Updater(
    				'glow', url,
    				{method: 'post', parameters: pars, evalScripts: ''});
    	addEvent(window, 'load', function() {
    	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(){
    		onComplete: function() {
    			if(Ajax.activeRequestCount == 0){
    AddThis button:
    <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';
    				<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 -->
    Thank you very much in advance.

  2. #2
    Join Date
    Mar 2007
    when it comes to frame works, you at the whim of the developer of the framework.

    IMHO you would be better off scripting your own routines than relying on others works that may be buggy.

    If you insist on using a framework then it would be quicker for you to get your help from vendors help forum, you may be lucky and someone here with experience of these frame works could possibly answer you.

    You will find reading in the web search results for help on this prototype.js will yield plenty of results with users complaining about issues, not being able to use these frame works because of compatibility issues and so on.

    Scripting your own Ajax routine should take you no more than 10 minutes (assuming you have prior coding skills), far quicker than messing around with prototype.js and finding a resolution to your problem and waiting for a patch for it.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    Join Date
    Jul 2005
    Last edited by Webnerd; 12-24-2008 at 09:36 PM. Reason: BUMP - Didn't see HTML - Need more time for solution
    Bitter web veteran

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center