Karl,
Thanks for your reply !
I have another problem though I hope you or someone else can help me with.
The popup window that comes up is an editable version of the parent window
that originated it.
When a button is clicked the edited data is posted to a servlet which
updates a data object.
This data object is then displayed in the original parent JSP page.
The servlet code does a response.sendRedirect(JSP page).
However, it displays the page in the same pop up frame.
Is there a way to close the pop up frame and have the data displayed in the
parent window ?
Thanks in advance
Farooq
-----Original Message-----
From: Karl Roberts [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 21, 2000 9:34 AM
To: [EMAIL PROTECTED]
Subject: Re: How to call JavaScript from servlet code ?
Hi,
Why not try
<A TARGET="aNewWindow"
HREF="http://your_host:port/servlet/path_to_your_servlet">
here is the link </A>
This will open a new browser window (providing that there isn't one called
"aNewWindow" already ) which will contain the response from the servlet you
need.
Presumably your servlet will do some work and then forward the request using
javax.servlet.ServletContext.getRequestDispatcher("http://your_host:port/ser
vlet/path_to_your_JSP").forward(ServletRequest
request, ServletResponse response) .
Hope this helps
Karl
Farooq Shaikh wrote:
> Hi All
>
> I need to access a servlet from a <A HREF> link. A servlet method is
called
> which redirects to a JSP page. Normally without the servlet in between I
> would call
> JSP from javascript like so :
>
> <a href="javascript://"
> onClick="window.open('../foo.jsp','newwindow',config='height=400,
> width=700,left=50,top=100
>
toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no
> ,status=no')">
> Edit</a> </td>
>
> But since I need the servlet to intervene and call the JSP itself, is
there
> anyway to acheive the same(with or without Javascript)
>
> Thanks
>
> Farooq
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html