I want the following scenario:
1 User clicks on a link
2 Popup window opens.
3 XXXXX - See below.
4 Popup disappears
5 original window reloads.
So I've got the link to pop open the window (1, 2). I've got the code that will work to close the child window and reload the parent (4, 5).
What is not working right now, is 3.
I want a form submission to take place, and after it's done processing, proceed with steps 4,5. I've googled around a bit, and several sites instruct me to use javascript to submit the form, and then proceed with steps 4,5, all from within the popup. The problem with this is, the form might not be processed (server-side) before my first page reloads. I want to be absolutely certain the form has completed processing. So what I've done is made a
servlet that does the form processing (3), then outputs the HTML/javascript required to produce steps 4, 5. In this way, I guarantee the main page is not reloaded until it's ready to.
Here is the code:
So , if you create a popup window with nothing but the above... then it works 'perfectly'... step 1,2,4,5 happen all as expected. But when the HTML/javascript above, is produced as the output of a form submission from within the popup, I get an error. On Mozilla, it just sits there with a blank screen. On IE, the error is:
Line: 5
Char: 4
Error: Access is denied
I suppose what's happening is, the result of the form submission is "some other page" and the 'opener' object is not maintained. I thought it would be, because I thought it was a 'window' attribute.
any ideas?