You should use an fb:js-string when you have something other than text to show in a dialog.
Here's an example:
<fb:js-string var="messageToShow">
Here's some text.<br />
and some more text...<br />
<p>You can even have HTML or FBML tags in here!</p>
<img src="http://absolute.path.to/the/image.jpg" />
<form id="selectFriendForm">
<label class="RedLabel">Select a friend:</label>
<fb:friend-selector name="uid" idname="selected_friend" />
</form>
</fb:js-string>
And then you have the function that shows the dialog:
<script type="text/javascript">
function showDialog() {
var dialog = new Dialog(Dialog.DIALOG_POP);
dialog.showChoice('Select a friend',
messageToShow, // fb:js-string var name
button_confirm = 'Choose this friend',
button_cancel = 'Cancel'
);
dialog.onconfirm = function() {
var formData = document.getElementById('selectFriendForm').serialize();
// ajax call to save my selected friend or whatever
}
}
</script>