Skip to content

Instantly share code, notes, and snippets.

@wufoo
Created February 21, 2011 23:27
Show Gist options
  • Save wufoo/837911 to your computer and use it in GitHub Desktop.
Save wufoo/837911 to your computer and use it in GitHub Desktop.
User Defined Callback for the Wufoo Form Embed Kit
function userDefinedCallback(message, transport) {
//FIG. 10 Close lightbox
$("#popup").fadeOut();
// FIG. 11: MAGIC: Receive code from wufoo.com
var objMessage = jQuery.parseJSON(message);
// FIG. 12: Create div and write out code for preview
// You wouldn't necessarily need to preview, you can do whatever you want with the code
$('<div />', {
html: objMessage.display
}).appendTo("#action-area");
// FIG. 13: tear down the library.
framework.destroy();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment