1
我有一個刪除鏈接,爲此我使用引導模態窗口。這裏窗口顯示正常當我點擊窗口的yes按鈕時,記錄應該被刪除。所以我必須在yes按鈕中調用servlet以及參數Id
,在這裏我可以調用servlet,但參數不通過。如何將參數傳遞給模式窗口的yes按鈕。這是它的代碼。將參數傳遞到引導模態按鈕
的引導模式,其中我打電話,
<td><a href="<%=request.getContextPath()%>/pages/teacher_details/teacher_info.jsp?teacherId=${teacher.getTeacherId()}">Edit</a>
</td>
<td> <a href="#" data-toggle="modal" data-target="#basicModal">Delete</a>
</td>
在同一個jsp頁面模式的標記是
,
<div class="modal fade" id="basicModal" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Delete Teacher Record</h4>
</div>
<div class="modal-body">
<h3>Are you sure?</h3>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<!-- <button type="button" class="btn btn-primary">Save changes</button> -->
<a href="<%=request.getContextPath()%>/controller/TeacherManagementController?flowName=DELETE_TEACHER_INFO&teacherId=${teacherId.getTeacherId()}"
class="btn btn-primary">Yes</a>
</div>
</div>
</div>
</div>
我現在面臨的問題是進行模態出現,但戰績不能刪除,因爲無法通過teacherId。請任何人在這幫助我。
ķ。 。在我的情況下,我怎樣才能設置隱藏的字段值 – user3599482