After hours of debugging, I decided this is beyond my level of expertise. So I turned to Google and I found the solution :-)
http://smoothgallery.jondesign.net/forums/viewtopic.php?pid=487 It was indeed a conflict between the namespaces, as I originally understood it. /sqad On Apr 1, 6:24 pm, "sqad" <[EMAIL PROTECTED]> wrote: > The exact error message seems to be: > > [quote] > Element.update is not a function > [/quote] > > /sqad > > Just checked that in the firebug logs... > > On Apr 1, 5:59 pm, "sqad" <[EMAIL PROTECTED]> wrote: > > > Right, the appropriate prototype libraries needed by webhelpers were > > included: > > > <% h.javascript_include_tag('/javascripts/effects.js', builtins=True) > > %> > > > Ok, so I fired up FireBug to do some debugging. When I make the ajax > > call, nothing is refreshing on the page that made the request. When I > > looked at where the firebug stopped in debug mode, it stopped at line: > > > 866, prototype.js > > > in the code block: > > updateContent: function() { > > 855 var receiver = this.responseIsSuccess() ? > > 856 this.containers.success : this.containers.failure; > > 857 var response = this.transport.responseText; > > 858 > > 859 if (!this.options.evalScripts) > > 860 response = response.stripScripts(); > > 861 > > 862 if (receiver) { > > 863 if (this.options.insertion) { > > 864 new this.options.insertion(receiver, response); > > 865 } else { > > 866 Element.update(receiver, response); > > 867 } > > 868 } > > > Mousing over the Element.update entry on Line 866, it complains that > > the 'update' method is 'undefined'. Ok, so I now I thought I had a > > buggy old version of prototype/scriptaculous libraries, so I pulled > > the latest source for both from their appropriate sites: > > > script.aculo.us effects.js v1.7.1_beta1 > > scriptaculous.js v1.7.1_beta1 > > prototype.js, version 1.5.1_rc > > > When I override the builtins, this is when I am getting the ajax > > response back, but now the entire page is returned instead of the > > fragment. This was the original problem. Is this a bug in > > prototype.js? I thought mootools can coexist without breaking ajax > > calls? > > > Appreciate any suggestions to fix or workaround this... > > > On Apr 1, 4:53 pm, Philip Jenvey <[EMAIL PROTECTED]> wrote: > > > > On Apr 1, 2007, at 2:59 PM, sqad wrote: > > > > > I wanted to put this slideshow feature on my site: > > > > >http://smoothgallery.jondesign.net/getting-started/ > > > > > I included the following libraries required for the slideshow: > > > > <% h.javascript_include_tag('/javascripts/slideshow/mootools.js') > > > > %> > > > > <% h.javascript_include_tag('/javascripts/slideshow/ > > > > jd.gallery.js') %> > > > > > I am using the Myghty template system. In my template I make a simple > > > > ajax call using h.form_remote_tag, as so: > > > > > Template: > > > > -------------- > > > > <% h.form_remote_tag( > > > > update = "myGallerys", > > > > url = h.url(controller="event", > > > > action="deleteArtifact") > > > > ) > > > > %> > > > > ......some code > > > > > <input id="eleDelete" name="eleDelete" type="submit" > > > > value="Delete"> > > > > <% h.end_form() %> > > > > > <div id="myGallerys">test</div> > > > > > Controller: > > > > --------------- > > > > def deleteArtifact(self): > > > > return render_response('/sandbox/test.myt', fragment=True) > > > > > test.myt: > > > > ------------ > > > > ....nothing to see here > > > > > What's happening? > > > > ---------------------------- > > > > When the delete action returns, the entire page is refreshing. I > > > > thought I did fragment=True! > > > > > When I commented out the mootools.js library in the autohandler, the > > > > page refreshes with the fragment, so I think defintely that something > > > > is buggy. I just don't know where! > > > > form_remote_tag uses the prototype javascript library -- I don't see > > > anything about including it via javascript_include_tag in your > > > description here. Could that be part of the problem? > > > > Specifying builtins=True to javascript_include_tag will cause it to > > > be included (as well as scriptaculous). > > > > -- > > > Philip Jenvey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
