SlicDiagWeb/src/main/webapp
diff -u -r1.3 -r1.4
--- dbSelect.jsp 20 Nov 2007 20:03:52 -0000 1.3
+++ dbSelect.jsp 30 Nov 2007 19:52:51 -0000 1.4
@@ -179,6 +179,7 @@
function addFile(selectId, tableId) {
var tbl = document.getElementById(tableId);
var fileEl = document.getElementById(selectId);
+ //alert("tableId="+tableId+", selectId="+selectId+"\n tbl="+tbl+", fileEl="+fileEl);
var file = fileEl.options[fileEl.selectedIndex].text;
var lastRow = tbl.rows.length;
@@ -235,6 +236,7 @@
//submitData(submitForm, 'dataTable');
toggleId("warningId", true);
+ return true;
}
function toggleId(id, on) {
@@ -247,7 +249,12 @@
}
div.style.display = disp;
}
- </SCRIPT>
+
+ function info(theForm) {
+ //alert("info: "+theForm.name);
+ return false;
+ }
+ </SCRIPT>
</head>
<body>
<c:if test="${!empty param.dataParameter}">
@@ -262,7 +269,7 @@
<c:set var="arrDisp" value="${fn:split(initParam.namesDisplay, ' ')}" />
<!-- Big form for selecting files -->
- <form name="dataSelectForm" action="">
+ <form name="dataSelectForm" action="" onsubmit="return info(this)">
<br><h3>Browse All Available Data:</h3>
<TABLE>
<c:forEach var="i" begin="0" end="1">
@@ -294,7 +301,7 @@
<c:out value="${arrDisp[fn:length(arrDisp)-1]}"/>:
</TD>
<TD COLSPAN="5">
- <SELECT name="${arrDisp[fn:length(arrDisp)-1]}">
+ <SELECT ID="${arrDisp[fn:length(arrDisp)-1]}" name="${arrDisp[fn:length(arrDisp)-1]}">
<c:set var="v" value="${aida:createList(data.rows, arrDB[fn:length(arrDisp)-1], false)}"/>
${aida:sortList(v, true)}
<c:forEach var="obj" items="${v}">
@@ -305,7 +312,7 @@
</SELECT>
</TD>
<TD>
- <button style="background-color: #fea;" onclick="addFile('File', 'dataTable')"><b>Add</b></button>
+ <button style="background-color: #fea;" onclick="addFile('${arrDisp[fn:length(arrDisp)-1]}', 'dataTable')"><b>Add</b></button>
</TD>
<TD>
<button style="background-color: #fea;" onclick="resetForm(this.form)">Reset Form</button>