Hi,
As you can see on the FBJS page
(http://wiki.developers.facebook.com/index.php/FBJS
), there is some trouble using javascript on facebook :
- Facebook redefined basic functions such as parentNode (redefined in
getParentNode).
- JavaScript code gets parsed, and any identifiers get prepended with
your application ID.
So, you can''t use classical framework as it under facebook.
I''ve started a project on porting Prototype and Scriptaculous for
Facebook. It''s mainly a work of rewriting stuff. It''s not
finish and I
think it''s not ready to be integrated in any plugin now. I want it to
be included into facebooker, but I think for now it''s too soon.
You can find it on my github repository :
http://github.com/meuble/yaps/tree/master
I''ve not make Scriptaculous'' Sortable.js passe on Facebook,
but I''ve
written almost 60-70% of Prototype and the entire Scriptaculous''
DragDrop.js (with all options exluded snapping) library.
Remember that it''s still under development, and many part needs
refactoring and a better rewriting.
HTH,
--
St?phane Akkaoui
http://www.imeuble.info
http://www.sociabliz.com
Le 1 d?c. 08 ? 18:29, Michael Lavrisha a ?crit :
> Hello all,
>
> I am working on a Facebook application, using Facebooker, that
> utilizes the Scriptaculous helper: sortable_element. I have got it
> working fine on my local machine but when I view it in Facebook
> there are a number of javascript errors that come up because of the
> generated javascript.
>
> The errors are (in order):
> TypeError: Undefined value
>
http://apps.facebook.com/fbml_static_get.php?src=...%3A4007%2Fjavascripts%2Feffects.js%3F1219101002&appid=35770759139&pv=1&sig=e639a923aa0dbed99d5d51c8d76c944c&filetype=js
> (line 24)
>
> controls.js requires including script.aculo.us'' effects.js library
>
> ReferenceError: Can''t find variable: a38770759139_Sortable
>
> Now I am not a javascript guru or for that matter a javascript
> ninja, so I don''t really know what is going on. But I think it may
> be something to do with FBML and how facebook changes all the
> variable names in the javascript.
>
> Has anybody come across an error like this?
>
> Thanks for you help,
> Mike
> _______________________________________________
> Facebooker-talk mailing list
> Facebooker-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/facebooker-talk