I have two simple interfaces. One accepts sql query the other is popup which display the result. I want to integrate them both. I mean i dont wnat the popup. Instead the result should be displayed on same page. I know it can be done with ajax, but dont know how. I dont want to get into that array stuff(sending data in array form from server). Simply i want the work to be done with the present code with little change..
This is display.jsp
<body>
<form action="show.jsp" method="post" target="show.jsp">
<textarea rows="4" cols="80" name="qry"></textarea>
<input type="submit" value="Show"/>
The below is show.jsp
<sql:query var="rs" dataSource="jdbc/production">
${param.qry}
</sql:query>
<body>
<table width="100%" id="dataTable" class="display">
<thead>
<tr>
<c:forEach var="col" items="${rs.columnNames}">
<th>${col}</th>
</c:forEach>
</tr>
</thead>
<tbody>
<c:forEach var="row" items="${rs.rowsByIndex}">
<tr>
<c:forEach var="column" items="${row}">
<td><c:out value="${column}"/></td>
</c:forEach>
</tr>
</c:forEach>
</tbody>
</table>
</body>
Anyone please give a solution for this(A simple one).