Advertisement
Guest User

Resize fbml.dialog

a guest
Jul 8th, 2010
5,996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var oldSize = FB.UIServer.Methods["fbml.dialog"].size;
  2. FB.UIServer.Methods["fbml.dialog"].size = {width:300, height:150};
  3.    
  4. var dialog = {
  5.     method: 'fbml.dialog',
  6.     fbml: '<fb:header icon="false" decoration="add_border">Some Prompt</fb:header>' +
  7.         '<div style="width:100%; height:100%;" align="center">' +
  8.         '<div style="margin:15px;">Do you wish to continue?</div>' +
  9.         '<label class="uiButton uiButtonLarge uiButtonConfirm"><input type="button" name="OK" value="OK"></label>' +
  10.         '<label class="uiButton uiButtonLarge uiButtonConfirm"><input type="button" name="Cancel" value="Cancel"></label>' +
  11.         '</div>',
  12.     width:300,
  13.     height:150
  14. };
  15.  
  16. FB.ui(dialog, function(result) { console.log(result); } );
  17. FB.UIServer.Methods["fbml.dialog"].size = oldSize;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement