I\'m using jQuery and SimpleModal in an ASP.Net project to make some nice dialogs for a web app. Unfortunately, any buttons in a modal dialog can no longer execute their po
FWIW, I've updated the blog post you pointed to with come clarification, reposted here - the reasoning & other details are in the blog post:
The solution (as of my last checkin before lunch):
From some comments I’ve seen on the web, point 1 needs some clarification. Unfortunately, I’m no longer with the same employer, and don’t have access to the code I used, but I’ll do what I can. First off, you need to override the dialog’s onClose function by defining a new function, and pointing your dialog to it, like this:
$('#myJQselector').modal({onClose: mynewClose});
function myNewClose (dialog){dialog.close();__doPostBack = newDoPostBack;}
function newDoPostBack(eventTarget, eventArgument) {var theForm = document.forms[0];if (!theForm){theForm = document.aspnetForm;}if (!theForm.onsubmit || (theForm.onsubmit() != false)){document.getElementById("__EVENTTARGET").value = eventTarget;document.getElementById("__EVENTARGUMENT").value = eventArgument;theForm.submit();} }