Re: Opening new child window - Running servlet (JSP and Servlet)
agapitolw@yahoo.es wrote:
Ideally, a servlet should be executed to do the business logic and
extract the data that will be displayed on showdata.jsp. Moreover, the
user may perform search in the child window, to filter or find the
results returned. My questions are as follows:
1. How to run servlet from Javascript that does the logic and then the
results are displayed in showdata.jsp (as a child window)?
This question belongs more in the comp.lang.javascript newsgroup, but
I'll do must to answer.
The JavaScript should be as follows:
function showResultsInWindow(page) {
childwin.location.href = page;
}
2. How to go about filtering or finding results in showdata.jsp while
it is open ? what is the recommended method? because the results have
a check box next to them and when user choses and closes window they
are reported back to the main JSP which opened the child JSP.
Not sure I understand your question. The answer appears to be either
AJAX or table sorting. It depends on whether or not the information
returned by showdata.jsp is sufficient to do the client-side filtering
required.
This question also seems to belong more in the c.l.javascript newsgroup.
If needed, I can pull up two bouts of client-side filtering from one of
my projects. One of them is sorting a table, and the other one is
filtering divs based on their contents.
Any suggestions, reading materials, code , etc is very appreciated.
Try poking around c.l.javascript.
--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth