jquery dialog 不能提交表单,谁有可以用的代码看一下哈我的代码如下:
$(function() {
$("#dialog2").dialog({
            buttons: { "Save": function() {
             document.forms[0].action='${ctx}<s:property value="surl" />';
            document.forms[0].submit();
             $(this).dialog("close"); }},
            resizeStop:function(event, ui) {mdialogResizeStop(event, ui);}
});
});
  <s:form action="" method="post" id="form01"> </table>
<div  id="dialog2" title="表单管理:">
<s:textfield label="中文表名*" name="descTable.tableZhName" 
type="text" size="15"  value="%{descTable.tableZhName}" ><br /></s:textfield>
...
                 </div>
</s:form>--------------------------------------------------
我在网上找了http://www.mail-archive.com/[email protected]/msg00333.html 
http://osdir.com/ml/jquery-ui/2009-02/msg00275.html
不过还没看到答案。 国外网打不开,郁闷的。谁能帮偶一下这个问题真让偶吐血的,一开始还以为是struts2的问题,直到使用myeclipse的tcp监视才发现没有提交上来。

解决方案 »

  1.   

    http://hsuyencheng.yo2.cn/articles/jquery-ui-dialog%e6%8e%a7%e4%bb%b6%e4%b8%ad%e7%9a%84%e8%a1%a8%e5%8d%95%e6%97%a0%e6%b3%95%e6%ad%a3%e5%b8%b8%e6%8f%90%e4%ba%a4%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95.html/comment-page-1#comment-15882汗,这里有高人解决了。
      

  2.   

    还有另一种方式,thickbox,里面引用ajax,在提交时$('#form1').submit(function(){
       $.post('',{},function(){});
       return false;
    });
      

  3.   

    那是因为dialog重新生成的div在form外面,所以才导致按钮无法提交.