hi!
i'm building a RoR app for facebook using FBML and the Prototype JavaScript library.
what i'm trying to do is have a div automatically refreshed, using the neat
periodically_call_remote
, which creates a PeriodicalExecuter object.
here's the code:
<%= render :partial => "status_item", :collection => @status %>
<%= periodically_call_remote( :url => { :action => :status, :id => @hunt.id }, :update => 'status_div') %>
i'm getting 2 kinds of errors:
SyntaxError: Parse error
's on fbml_static_get.php on http://biascica.pipps.net:8888/javascripts/prototype.js?1246455754 and the likes (effects.js and controls.js)ReferenceError
's:can't find variable a116508001384_PeriodicalExecuter
this is the javascript code, as modified by facebook:
new a116508001384_PeriodicalExecuter(function() {new a116508001384_Ajax.Updater('status_div', '/corinna_test/servers/ren%C3%A9/treasure_hunts/12/status', {asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + a116508001384_encodeURIComponent('qBY5jTvJ04rEcvLsQzkhNkEhRXN1wRA2ITrgq/4JmVg=')})}, 10)
(notice how they appended a116508001384_
in front of almost everything)
i'm also getting iframex
errors but i don't think that's a priority right now.
can anyone help me make sense of this mess?
thanks! asymmetric