Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

https and self.close isn't working 2

Status
Not open for further replies.

meldrape

Programmer
May 12, 2001
516
US
Hi all,

I'm using the following in a child page after it posts info to a database:
Code:
'refresh parent, close self
With Response
    .Write "<script language=javascript>"
    .Write "window.opener.location.reload();"
    .Write "self.close();"
    .Write "</script>"
End With
This worked perfectly until I made the child page an "https:" page because the user has to enter their ssn. Now it just stays open with a permission denied script error. Any thoughts? I don't know how to get around this. many thanks in advance.

 
Wouldn't that be
Code:
.Write "window.close();"

------------------------------------------------------------------------------------------------------------------------
"I am not young enough to know everything."
Oscar Wilde (1854-1900)
 
I tried window.close without any luck, I'll try the other one and see what happens. thanks very much!
 
Is it reloading the master page? Here's something that may help: Something similar?

------------------------------------------------------------------------------------------------------------------------
"I am not young enough to know everything."
Oscar Wilde (1854-1900)
 

Still no luck. I need to close the secure window... I need to close the child widow. I thought about posting to the Javascript forum but didn't want to get into trouble. Since it's in an ASP page, I figured I'd have my best luck here. If you have any other ideas, please let me know. Thanks.
 
If you've posted in the wrong forum (or one that cannot answer your question), you don't get in trouble for posting into another forum. At worst, you can just let the other forum know you've posted incorrectly in another and no harm/no foul. ;-)

I am curious, however, as to whether you are able to reload the master page with the code you have in your first post. The link I posted in my previous post suggests that there may be an issue with using non-cross browser code - which is why I questioned whether your first code worked in terms of reloading the master page. Additional feedback may be useful.

------------------------------------------------------------------------------------------------------------------------
"I am not young enough to know everything."
Oscar Wilde (1854-1900)
 
Hi Chopstick, yes, it reloads the parent page. It's weird, if I take off the "s" from https and refresh the page, it closes the window. Frustrating. I guess I can do a redirect to the child page without the https then run the script again... How clunky! but if it work, who cares, ha!
 
chopstik, please accept my apology. It DID NOT refresh the parent window. I'll do the redirect to an unsecure page, and then run the script. I'll let you know whatever works. Thanks so much for your help.
 
That would be one way of doing it. Another would be using DotNetGnat's suggestion:
Code:
.Write "window.opener.location.href=URL;"
and then seeing if that will both refresh/reload your master page and then proceed to the next line. This was also the same advice offered in the link I provided earlier. Let us know what happens.

------------------------------------------------------------------------------------------------------------------------
"I am not young enough to know everything."
Oscar Wilde (1854-1900)
 
Yes, I understand now. And yes, it worked. Thank you VERY much for your help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top