Input inside Jquery UI Dialog not being sent?

后端 未结 5 1346
情深已故
情深已故 2020-12-08 21:44

The input fields in my dialog box aren\'t being posted, and i\'m not sure why...

i\'ve tested it on mac firefox and safari, and windows IE & firefox with the sam

5条回答
  •  抹茶落季
    2020-12-08 21:54

    When JQuery opens the dialog box , it moves it outside the form.

    Here's the solution for that:

    jQuery UI Dialog with ASP.NET button postback

    basically in your case:

    var dlg =  $("#dialog").dialog({ 
       autoOpen: false, 
       buttons: { 
        "OK": function() { 
         $(this).dialog('close'); 
        } 
       } 
      }); 
    dlg.parent().appendTo($("#yourformId")); 
    

    should fix it.

提交回复
热议问题