Spring MVC 3 で Web アプリケーションをテストしていますが、解決できないエラーに直面しています。
forEach ステートメントを使用して JSP で処理される DB からのデータのリストを提供するコントローラーがあります。また、 i の内部には、ボタンをクリックforEach
した後に表示されるフォームがあります。jquery-ui dialog
私のJSPは次のようになります。
<html>
/**
*
*
**/
<c:forEach items="${listaFecha}" var="fec">
<tr>
<td><c:out value="${fec.id}" /></td>
<td><c:out value="${fec.NOM_ASUNTO}" /></td>
<td><fmt:formatDate value="${fec.FEC_INICIO}" pattern="dd-MMM-YYYY" /></td>
<td><fmt:formatDate value="${fec.FEC_FIN}" pattern="dd-MMM-YYYY" /></td>
<td><c:out value="${fec.PERIODO}" /></td>
<td><button id="faqIE${fec.id}" value="${fec.id}" onclick="changeFec(${fec.id})">Editar</button></td>
</tr>
<div id="edit-form${fec.id}" class="edit" style="text-align:center;" title="Editar Fecha"> </br>
<form name="fechasE" method="POST" target="_parent" action="<c:url value="/manage/insertaForm"/>" id="form2E${fec.id}">
<label style="margin-right:133px;">Tipo de Solicitud: </label></br>
<input type="text" class="fields" name="asE" value="${fec.NOM_ASUNTO}" disabled/></br>
<label style="margin-right:158px;">Fecha Inicial: </label> </br>
<input type="text" class="fields" name="date1E" value="<fmt:formatDate value="${fec.FEC_INICIO}" pattern="dd-MMM-YYYY"/>" /></br>
<label style="margin-right:165px;">Fecha Final: </label></br>
<input type="text" class="fields" name="date2E" value="<fmt:formatDate value="${fec.FEC_FIN}" pattern="dd-MMM-YYYY"/>" /></br>
<label style="margin-right:185px;">Periodo: </label></br>
<input type="text" class="fields" name="pdE" value="${fec.PERIODO}"/></br>
</form>
</div>
</c:forEach>
/**
*
*
**/
<script type="text/javascript">
function changeFec(n) {
$( "#edit-form"+n ).dialog({
autoOpen: true,
height: 390,
width: 350,
modal: true,
resizable: false,
buttons: {
Editar: function() {
$( "form2E"+n ).submit();
$( this ).dialog( "close" );
},
Cancelar: function() {
$( this ).dialog( "close" );
}
}
});
}
</script>
Opera、Google Chrome、Firefox では正常に動作しますが、IE7、8、9 では動作しません。どうしてか分かりません!私は成功せずに何時間も探してきました!誰かが私を助けてくれることを願っています。
事前に感謝し、私の下手な英語で申し訳ありません.
編集:
これは、http://jsfiddle.net/NbddB/22/を機能させる方法です。ただし、値はchangeFec(value)
動的である必要があり、div はforEach
ステートメント内で動的に作成されます。