Click to See Complete Forum and Search --> : window.opener "Access is Denied" error


gbhagia
12-04-2003, 01:45 AM
Hi,
I am having this weird problem. I am trying to resize the opener window using window.opener.resizeTo function. It works fine on my server (nothing to do with browser) and my clients development server but throws an "Access is Denied" JS error on their Test server even when i am using the same browser. Please help as my client is sitting on my head for this to get resolved.

Code:
if(window.opener && !window.opener.closed){
window.opener.resizeTo(750,500);
window.opener.location = "someURL";
}
else
window.open("someURL", 'HHEnrollment','width=750,height=500,resizable=Yes,scrollbars=yes');


self.close();


Thanks.

Pittimann
12-04-2003, 06:24 AM
Hi!

To me your code doesn't make sense. As long as no popup window is opened, there is now window opener (and for the parent window it won't exist whatever happens afterwards).

Your code opens a popup - at the same time you want the parent window to be resized and immediately closed afterwards - what for?? No need to resize before closing!

Hoping you only need help on:
I am trying to resize the opener window...
This would look somehow like the following:
<script type="text/javascript">
<!--
window.resizeTo(750,500);
//-->
</script>

Cheers - Pit

gbhagia
12-04-2003, 06:48 AM
Thanks for your reply. I am sorry i didnt explain things properly. The code mentioned exists on the submit page of a form in the popup window which gets opened from a main window.
First i check if the user has not closed the main window. if exists, resize it and point to a url. if closed or does not exist, open a new one.

I figured out the problem. Its SSL. The main window is not SSL but the form in pop up submits to a SSL page. Thus access is denied error.

Any solutions?

Thanks again for ur time.