Jan Deppisch wrote: > Hi, > > on my page I start an ajax-request which returns rhtml-code (I use > Rails) looping over some objects. When I place the following code within > the loop my browser (FF) crashs: > > <script> > var set_std_objekt = function (id) { > new Ajax.Updater('divname', '/dosomestuff', { > asynchronous:true, > evalScripts:true > }) > } > </script> > > <a href="#" onclick="set_std_objekt (1); return false;"><img...></a> > > What's wrong here ? > > Instead when I include the "new Ajax.Updater..." in the > onclick-attribute then it works: > > <a href="#" onclick="new Ajax.Updater....; return false;"><img...></a>
I was also having some problems with FF 1.0.x crashing when using evalScripts and some complicated Javascript. I never found the root of the problem because I have since switched to using behaviour.js (http://bennolan.com/behaviour/) and just call Behaviour.apply() in my Ajax.Updater's onComplete function. It works flawlessly and has really cleaned up my HTML. -- Michael Peters Developer Plus Three, LP _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs