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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect and new window 1

Status
Not open for further replies.

girky

Programmer
Oct 24, 2002
72
0
0
US
Hi,

I want to open a new window and redirect the old window. I thought this would be so easy, but I cannot get it to work, it only redirects.

Response.Write &quot;<SCRIPT LANGUAGE=&quot;&quot;javascript&quot;&quot;><!--&quot;
Response.Write &quot;window.open(&quot;&quot;sheet.asp?REQ=&quot; & RequestID1 & &quot;&quot;&quot;,&quot;&quot;_blank&quot;&quot;)&quot;
Response.Write &quot;--></SCRIPT>&quot;
Response.Redirect &quot;requestslist.asp&quot;


Any suggestions? Thanks
 
you need to use window.parent.location
This is an example
1.htm is the first file, abc.htm is the popup,def.htm the redirection

1.htm

<html>
<head>
<script language=&quot;JavaScript&quot;>
function redopen()
{
window.open('abc.htm','trial');
window.parent.location = 'def.htm';
}
</script>
</head>
<body onLoad='redopen()'>

</body>
</html>

code for abc.htm

<html>
<head>

</head>
<body >
this is abc.htm
</body>
</html>

code for def.htm

<html>
<head>

</head>
<body >
this is def.htm
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top