I'm trying to place the Facebook multi-friend-selector in a Facebox (don't want to use fb:dialog as it pops a new window). The problem I'm having probably stems from escaping quotation marks in javascript, but I've been banging my head against the wall trying to figure it out.
Is there a better way to do this?
$('#test_button').click(function(){
$.facebox(
"<div id='box'>" +
"<fb:serverfbml width='615'>" +
"<script type='text/fbml'>" +
"<fb:request-form action='http://example.com/'" +
"method='POST'" +
"invite='true'" +
"type='Example'" +
"content=""Echo Content. <fb:req-choice url=""http://example.com/"" label=""Example Label"" />"">" +
"<fb:multi-friend-selector showborder='false'" +
"bypass='cancel'" +
"cols=4" +
"actiontext='Invite Friends To Example'/>" +
"</fb:request-form>" +
"</script>" +
"</fb:serverfbml>" +
"</div>"
);
});
Note: I substituted all of the example.com stuff for the purposes of this post. The multi-friend-selector code works fine when taken out of the Facebox string.
Thanks in advance for any help.