Skip to content

Instantly share code, notes, and snippets.

@nhocki
Created March 26, 2010 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhocki/345340 to your computer and use it in GitHub Desktop.
Save nhocki/345340 to your computer and use it in GitHub Desktop.
$("#dialog").dialog({
bgiframe: true,
autoOpen: false,
height: 600,
width: 500,
modal: true,
buttons: {
'Lend Asset': function() {
$("#new_lending").submit();
$(this).dialog('close');
},
Cancel: function() {
$(this).dialog('close');
}
},
close: function() {
}
});
$("img.prsAssetImage").click(function(){
var a_id = $(this).attr('id');
a_id = a_id.replace("prs_", "");
$("#dialog").load("lendings/new", {asset_id: a_id});
//$.post("lendings/new", {asset_id: a_id});
$("#dialog").dialog('open');
});
http://jqueryui.com/demos/dialog/#modal-form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment