gigaZhang / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

when Form has tow sumbit btns,the "input submit btn is broken" #934

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(This is for feature requests and bugs in Struts2 jQuery Plugin - for
getting help, please use the User Group.
http://groups.google.com/group/struts2-jquery )

JSP CODE:

<script type="text/javascript" language="JavaScript">
        function saveclose() {
            $('#itEMGUID').val($('#returnParam').val());
            setTimeout('window.opener.location.href=window.opener.location.href;window.close();', 100);
        }
    </script>
</head>
<body class="detailpage" style="margin:8px;">
<sj:div id="result"></sj:div>
<div class="toolbar">
    <a href="javascript:void(0);" onclick="javascript:document.getElementById('saveAndClose').click()"
       class="btn4_gray">保存关闭</a>
    <a href="javascript:void(0);" onclick="javascript:document.getElementById('saveAndView').click()" class="btn4_gray">保存查看</a>
</div>
<hr/>
<s:form id="addProjInfoForm" name="addProjInfoForm" namespace="/xmdj" 
action="ajaxSaveProjectInfo" theme="simple"
        method="POST" enctype="multipart/form-data">
    <span class="none">
    <sj:submit targets="result" id="saveAndClose" value="保存关闭" onclick="saveclose();"/>
    <!--<input type="submit" id="saveAndClose" value="保存关闭" onclick="saveclose()"/>-->
    <sj:submit id="saveAndView" targets="result" value="保存查看"/>

What steps will reproduce the problem?
  like upwards code to use two submit,one is input,one is sj:submit,the input submit cant work, but if i use the same as sj:submit, they are all can work!

What is the expected output? What do you see instead?

Which struts2 version?
2.3.4

Which struts2-jquery plugin version?

Please provide any additional information below.

Original issue reported on code.google.com by private....@gmail.com on 30 Dec 2012 at 7:33

GoogleCodeExporter commented 9 years ago

Original comment by johgep on 13 Jan 2013 at 10:03