PermaLink JQuery UI Dialog and ASP.Net button postbacks11/11/2009 06:40 PM
When you use JQuery UI's Dialog plugin to bring up a div as a dialog, it usually pulls the div out of the form to do this and then ASP.Net elements don't work.  I found this clean solution to this from Ravi's Software+Usability Blog:
In your dialog creation code, add an open event handler:
    $('#divDialog').dialog({
      bgiframe: true, autoOpen: false, height: 175,
      width: 600, minWidth: 200, modal: true,
      open: function(type,data) {
        $(this).parent().appendTo("form");
      }
    });
This will bring the ASP.Net elements back inside the form so they can post back to the ASPX page properly.

Comments :v
No comments.
Start Pages
RSS News Feed RSS Comments Feed CoComment Integrated
The BlogRoll
Related Links
Calendar
March 2010
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Search
Contact Me