dcsimg
How can I get the child page to refresh the parent page.. when the two pages are on different web servers ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Christopher_Lupton
Posted On:   Monday, June 14, 2004 08:14 AM

(My apologies in advance if this seems too long a post.. but this is not your 100% typical parent/child javascript scenario... I really wished it was... but Im stuck with it.) Ok, I have already learned about the javascript that allows a child window to reload the parent window. But the problem here is that when I execute that javascript, I get a "Error: Access is denied." I don't like the setup that I have to deal with.. but there are 2 web servers involved (not load balanced.) Page #1 is an upload page. When you submit the page.. it Posts to a Java Servlet.. it also executes javascript just prior to the Post event to open a new window. The new window will be an acknowlegement window that contain   More>>

(My apologies in advance if this seems too long a post.. but this is not your 100% typical parent/child javascript scenario... I really wished it was... but Im stuck with it.)



Ok, I have already learned about the javascript that allows a child window to reload the parent window. But the problem here is that when I execute that javascript, I get a "Error: Access is denied."



I don't like the setup that I have to deal with.. but there are 2 web servers involved (not load balanced.)



Page #1 is an upload page. When you submit the page.. it Posts to a Java Servlet.. it also executes javascript just prior to the Post event to open a new window. The new window will be an acknowlegement window that contains information known only once the Servlet handles the Post from the upload form.



ok, so far so good.. nothing entirely special there. However, when the User sees the fully rendered Ack Page (the child window).. They are to click the Close/Ok button. This, of course, closes the window.. but then needs to reload Page#1 (the Upload form) so that the user could upload another document.



If everything was located on just one webserver I know this would work. The problem is that the Upload page is served from a PlumTree server. It has the javascript to open the Acknowlegement Page. But the POST is to a WebLogic webserver which then proxies over to the WebLogic J2EE Servlet that determines the acknowlegement data and then renders the page.



I know this is less than an ideal situation.. but I am stuck with it. My guess is that javascript from one server can not deal with javascript/objects on another server... Once the WebLogic Servlet sends data to the child window.. I am guessing that the child window no longer belongs to the PlumTree Upload Form and therefore the JavaScript in the child window no longer has access to the opener.document.location.reload() method ?




Any suggestions ?



I wanted to change the child window from using opener.document.location.reload() to maybe another POST event which would hit a Servlet.. which would then somehow get the UploadForm to render again. Either way as long as the form is blanked out.. we are good to go.



But I dont understand how I can get the Acknowlegement Window to tell a Servlet how to this since they are on different webservers. (Same LAN.. no Firewalls inbetween them.. but still different Servers).



Sincerely,

GenMoltek@aol.com

   <<Less

Re: How can I get the child page to refresh the parent page.. when the two pages are on different web servers ?

Posted By:   Christopher_Koenigsberg  
Posted On:   Monday, June 14, 2004 10:00 AM

I think what you are trying to do is known as "Cross-site scripting" (where javascript in a browser window from one site attempts to access or manipulate a browser window from a different site). Unfortunately it is a known security hole, and should be prevented by browsers.
About | Sitemap | Contact