File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How do I pop a daughter window  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How do I pop a daughter window  " Watch "How do I pop a daughter window  " New topic
Author

How do I pop a daughter window

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Scenario:
1. Upon signing into a site, a page is created and sent to the browser by a CGI Bin server.
2. This page executes a JAVA servelet on another server to determine if the customer signing in is eligible for special offers. This servelet also retrieves the special offer data. If so, a daughter window needs to be presented on top of the original page returned with special offer data. If not eligible, nothing is displayed.
Question:
1. What code is needed on first page (from CGI BIN server) displayed to exectute the servelet and pop or not pop the daughter window?
2. How can the servelet (on the second server) respond with or without data? Could a JSP be used?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
The only way you are going to get a daughter window on the browser is by executing some Javascript code. Neither the servlet nor the CGI can force the browser to open another window. Unfortunately my Javascript is real rusty so I can't tell you the code.
"This page executes a JAVA servelet on another server to determine if the customer signing in is eligible for special offers." Does not make any sense - a HTML page can't execute a servlet. Presumably you mean that the CGI process executes the servlet while creating the page.
Anyway, your CGI will have to decide whether or not to include the Javascript that creates a daughter window in the page output.
Bill

------------------
author of:
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Please note that The Java Ranch has a naming policy, described here and "Sunyoga" is not a valid name.
Please choose one which meets the requirements.
Thanks.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I pop a daughter window