File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Is it possible to display the success page as a pop up window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Is it possible to display the success page as a pop up window" Watch "Is it possible to display the success page as a pop up window" New topic
Author

Is it possible to display the success page as a pop up window

Anil Verghese
Ranch Hand

Joined: Oct 11, 2006
Posts: 155
Hi,

Is it possible to display the success page as a popup window.. I want to display the success page as a popup window.


Anil
Amit Sharma
Greenhorn

Joined: Jul 26, 2005
Posts: 9
hi Anil,

I think you can acheive this with ajax.

i.e. submit your from using ajax and based on the response open a new window and show your success message.

I have not done something like this myself, but I think this will work.

- Amit


Amit Sharma
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Ajax is not necessary, and this is not a Struts question, I've moved it to an appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

The response will appear in whatever window the request was made. There is no way to specify that the response appear in an alternate window other than that within which the request was made.

So you need to either:

1) Open the new window and submit the request to that window in the first place.

2) Include JavaScript in the response that will open the new window and cause the "success" page to be displayed within that new window.

Whether you use Ajax or not is irrelevant as the Ajax response is not automatically displayed anywhere.
[ April 05, 2008: Message edited by: Bear Bibeault ]
Amit Sharma
Greenhorn

Joined: Jul 26, 2005
Posts: 9
hi

What I was suggesting is that having form submitted using ajax and as part the response to the ajax submit request, we get some message as the operation was successfully performed and showing that on a new window.

Anyway, I am new to ajax so cannot argue much on this :-(
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

Sure that's possible, but the OP didn't say anything about already using Ajax, and adding Ajax to the mix doesn't solve the problem -- it's just another way to submit the request. There still must be work done to cause the response to appear in a new window.
 
Don't get me started about those stupid light bulbs.
 
subject: Is it possible to display the success page as a pop up window