的Java脚本代码:不回答只是代码snipt-
function printAll(){
var checkBoxLength = document.getElementsByName('ids');
var checkedIds = "";
for(var i = 0;i<checkBoxLength.length;i++){
if(checkBoxLength[i].checked){
checkedIds += i+",";
}
}
//all the selected checkboxe ids
checkedIds = checkedIds.substring(0,checkedIds.length-1);
if(checkedIds.length <=0){
alert("Please select atleast one row to print.");
return false;
}
//value set to hidden field so that it can access to popup window
document.getElementById("checkedIdField").value = checkedIds;
//trying to assign a list to hidden field but getting error
document.getElementById("medicationList").value = <s:property value="medicalRecordClient.patientMedicationEntries"/>;
childWindow = window.open("/cascade/pages/jsp/medicalrecord/print_medication_detail.jsp","Browse","left=200,top=200,width=700,height=530,toolbar=0,resizable=0");
}
你可以发布一些代码,或更好的,创建一个jsFiddle? – 2012-02-29 17:40:14
我有一个userList – BIdesi 2012-02-29 17:47:57
我有一个用户列表,其中用户具有有关用户详细信息,在我创建的行动中的信息列表 userList =来自数据库的数据,并且我为它创建了getter和setter。在jsp中迭代userList,比如
和迭代器里面的等等,并带有一个复选框和一个输入按钮我调用了 – BIdesi 2012-02-29 17:56:52