Buttons inside facebox popup don't postback (fix)
I was developing an asp.net page that has popups in facebox,
one of these popups had a button with a postback behavior and code behind to execute,
unfortunately the postback behavior didn't run properly,
when i clicked that button it looked like a client side button with no postback behavior,
after googling this problem with no results, i had to edit facebox.js file myself to get around this problem,
here's the solution and explanation
Solution:
1. in facebox.js go to this line: $('body').append($.facebox.settings.faceboxHtml)
2. replace it with $('#aspnetForm').append($.facebox.settings.faceboxHtml)
that would fix the problem,
Explanation:
if you look into facebox.js file, facebox appends the div that pops up inside the body of the page not inside the form,so clearly you should place that div inside the asp.net form to enable button's postback,
Have fun...