Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 17th, 2006, 08:18 PM
Authorized User
 
Join Date: Jan 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Response.Redirect + Javascript

Hello-

I want to close the pop-up window after a submission to it and refresh th prent window. How can I force this to happen? I have the follwoing but i just get erros. any help is appreciated!

Response.Redirect "Javascript;opener.window.location=opener.window.l ocation;self.close();return false;"

 
Old January 17th, 2006, 08:28 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

This bugged me for a while, the following code works like a charm:

<%
   if some condition = whatEver then
      some asp code...
   else
%>
      <script language = JavaScript>
       opener.history.go(0);
       self.close();
      </script>
<%
   end if
%>

Wind is your friend
Matt
 
Old January 17th, 2006, 09:17 PM
Authorized User
 
Join Date: Jan 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks man! I know eons ago i had come up with the asnwer but it's been so long I dont remember. Yours works great thought too.

Cheers






Similar Threads
Thread Thread Starter Forum Replies Last Post
TIMED response.redirect misskaos Classic ASP Basics 2 December 9th, 2006 08:13 PM
response.redirect sarah lee ASP.NET 1.0 and 1.1 Basics 1 October 27th, 2006 08:57 AM
response.redirect ava_h .NET Framework 2.0 0 October 18th, 2006 10:21 PM
response.redirect crmpicco Classic ASP Basics 3 February 9th, 2005 01:50 AM
Response.Redirect dhborchardt Classic ASP Basics 4 June 16th, 2003 05:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.