> Ideally, a servlet should be executed to do the business logic and
> extract the data that will be displayed on showdata.jsp. Moreover, the
[quoted text clipped - 3 lines]
> 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.

Signature
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
agapitolw@yahoo.es - 27 Aug 2007 08:14 GMT
> 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;
Thank you very much for your reply . I have posted this question to a
Javascript forum .... Just wonder if you could tell me how to run a
servlet (and not a jsp page) from javascript.
> 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
[quoted text clipped - 11 lines]
> my projects. One of them is sorting a table, and the other one is
> filtering divs based on their contents.
Perhaps it will be clear with an example .... I have several text
boxes that should be filled from some values that are extracted from
database.
Suppose I have textbox sport and textbox player
Now if user clicks a link beside sport textbox, another window opens
(by running servlet , forwarding results to showdata.jsp) . Now user
will see list of options like basketball, football, etc. But the list
could be long and I don't want him to scroll down the page and look
for it. I would like to know if there is a good method to enable him
to search in the same form that is displaying data.
Thanks again
Andrew Thompson - 27 Aug 2007 08:37 GMT
...
>...I would like to know if there is a good method to enable him
>to search in the same form that is displaying data.
Yes. JavaScript is well suited to that type of task,
so your post over on c.l.js should get it sorted.
Of course, when posting to the JS group, it often pays to
ignore the entire Servlet/JSP source of the data, and
simply refer to it as a web page (HTML), since ultimately,
HTML (with embedded scripts, or references to external
scripts) is what is delivered to the browser.

Signature
Andrew Thompson
http://www.athompson.info/andrew/
Lew - 27 Aug 2007 13:57 GMT
> Thank you very much for your reply . I have posted this question to a
> Javascript forum .... Just wonder if you could tell me how to run a
> servlet (and not a jsp page) from javascript.
A JSP page /is/ a servlet!
You invoke a servlet by using its URL as the target of a form POST.

Signature
Lew