Reference Guide

facebook FBML Reference Guide Page 154 of 159
(constructor) type can be either Dialog.DIALOG_POP or Dialog.DIALOG_CONTEXTUAL.
Dialog.DIALOG_POP
This is the type of dialog that shows up when you delete a wall post.
Dialog.DIALOG_CONTEXTUAL
This is type of dialog that shows up when you delete a minifeed story.
onconfirm
An event handler that fires when the user selects the button designed as "confirm" (left most button). If this
event doesn't return false the dialog will be hidden.
oncancel
An event handler that fires when the user selects the button designed as "cancel" (right most button). If this
event doesn't return false the dialog will be hidden.
setStyle
Allows you to set the style of the parent dialog node
showMessage(title, content, button_confirm = 'Okay')
Displays a dialog with only a confirm button. title and content can be either strings or pre-rendered FBML
blocks.
showChoice(title, content, button_confirm = 'Okay', button_cancel = 'Cancel')
Displays a dialog with Confirm and Cancel buttons. title and content can be either strings or pre-rendered
FBML blocks.
setContext
(only applicable for DIALOG_CONTEXTUAL). Sets the context of a dialog, which basically means where the
cursor arrow is pointing.
hide
Hides this dialog if it is visible.
FBML Blocks
Blocks of pre-rendered FBML can be exported into your JavaScript scope on page load. To do this, simply wrap
a block of FBML inside an <fb:js-string var="variable_name"> tag (see Fb:js-string for more information).
Instead of rendering the block of FBML on the page it is put into a FBML block variable, which you can then
use in your JavaScript with setInnerFBML. This is useful, because tags like <fb:swf> get rendered without
waitforclick restrictions. FBML blocks can also be retrieved from AJAX calls, as explained above.
Animation
Facebook has provided a powerful animation library in FBJS. See Animation for more details.
Examples
Hello World!
Typeahead widget
Ajax Typeahead widget
Dialogs
Dynamic Dialogs using Ajax
Ajax
Dynamic Tables
Slider Widget
Tabs
www.yapish.com