This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Refresh Browser then Open a Popup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Refresh Browser then Open a Popup" Watch "Refresh Browser then Open a Popup" New topic
Author

Refresh Browser then Open a Popup

Lou Pelagalli
Ranch Hand

Joined: Nov 11, 2003
Posts: 150
    
    1
Hi,

Using Struts 1.1.

Does anyone have suggestions as to how I can accomplish the following?

1) User submits form.
2) Database is updated.
3) Current browser is refreshed to show database changes.
4) A popup window is opened.

I have working all but step 3 at this time.

Thank You in Advance for Your Help,

Lou
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

3 should be cake. When the page is submitted, they're taken to a page that presents the new db info. What's so difficult.


A good workman is known by his tools.
Lou Pelagalli
Ranch Hand

Joined: Nov 11, 2003
Posts: 150
    
    1
Hi Marc,

Thank you for checking out my post.

I'm glad to know that you think this is not difficult.

I'm new to this and I'm needing help to accomplish my task.

I am having difficulty with is how to refresh the current browser and then open a popup from the same for submit. That is, one submit does both actions.

Any suggestions?

Lou
[ June 28, 2004: Message edited by: Lou Pe ]
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Ooooh... I understand your problem now.

You currently have the pop-up set as the target of your submission.

Well, this will be a tad tricky.

My hunch is that you could have the submission be for the same window and this will take care of the refresh. (Prob 3 solved)
But now number 4 is a problem...
I would then include some javascript so that a new window is opened when entering the new page OR the javascript could open the new window upon submission. The first might be better if the pop-up is to display info pertaining to the submission.
 
wood burning stoves
 
subject: Refresh Browser then Open a Popup
 
Similar Threads
Opening a window popup from within a Servlet
SCJP sample questions from Sun
regarding refreshing the parent window
different popups for different browser session?
Closing windows in JavaScript