나는 내 JSP에 다음 코드가팝업이
function doContractAction(actionUrl) {
var strActionUrl = actionUrl;
if(strActionUrl !=null) {
document.forms[0].action = actionUrl;
document.forms[0].submit();
}
return false;
}
<div id="content">
<div id="report">
<s:form name="openControl" id="myActionForm" theme="simple" action="ShowAlertReports" method="post">
<div id="accordion">
<s:iterator id="alertCat" value="alerts" status="status" >
<h2 style="font-size:1.1em; padding-top:0px;padding-left:1px;padding-bottom:-5px; font-weight:bold;">
<p align="left"><s:property value="%{key}"/></p>
</h2>
<br>
<div>
<table id="${status.index}" class="grid one-em-below constant-left-width" cellspacing="0" d="ad-hoc-reports">
<thead class="nosort">
<tr>
<th scope="col" class="sortAsc" onclick="applySort(this);"><a style="cursor:pointer; color: #0066FF; font-weight:bold;">Alert Name </a></th>
<th scope="col" onclick="applySort(this);"><a style="cursor:pointer; color: #0066FF; font-weight:bold;">Customer Name</a></th>
<th scope="col" onclick="applySort(this);"><a style="cursor:pointer; color: #0066FF; font-weight:bold;">Date Opened</a></th>
<th scope="col">Action</th>
</tr>
</thead >
<tbody style="font-size:12px;">
<s:iterator id="alertsubcat" value="%{value}">
<tr>
<td>
<s:property value="name"/>
</td>
<td>
<s:property value="customerName"/>
</td>
<td style="font-size:11px;">
<s:if test="%{display=='OK'}">
<input type="button" value='<s:property value="%{display}" />'
onclick='return closeInfoAlert("<s:property value="%{alertsNotificationId}" />");' />
</s:if>
<s:else>
<input type="button" value='<s:property value="%{display}" />'
onclick='return doContractAction("<s:property value="%{url}" />");' />
</s:else>
</td>
</tr>
</s:iterator>
</tbody>
</table>
<br>
</div>
</s:iterator>
</div>
<s:hidden name="description" id="description" value=""/>
</s:form>
<br>
</div>
</div>
지금 <p align="left"><s:property value="%{key}"/></p>
값
- Alert1, Alert2 Alert3 등
내 요구 사항은 코드에서입니다.
<s:else>
<input type="button" value='<s:property value="%{display}" />'
onclick='return doContractAction("<s:property value="%{url}" />");' />
</s:else>
난 {키}를 값 = "%를 전달하기 위해 필요한 기능 doContractAction 체크되며 I는 키 값을 확인할 수 있고 그것이 Alert1 또는 경보 2 같으면. 팝업 창이 열립니다
어떻게 처리합니까?
URL을 사용하여
p
의 값을 얻을 수 있습니다; } – ronan달성하려는 목표는 무엇입니까? –