• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

As the child window gets closed the IFRAME redirects to another page

The parent page is composed of an IFRAME named 'f1' alongwith an ID 'frame1'. The page that reloads in IFRAME is named as "ProductList.asp". As I click on any link from the IFRAME page, a new window opens. What I want is that when I click on the button in new window, the child window gets closed, moreover the IFRAME in parent page redirects to "ListSuppliers.asp". What code shall be followed? I used the following but it didn't work out.

<script language="JavaScript">

      function CloseWin()
        window.frames['f1'].src = "ListSuppliers.asp"


<form name="prodInfo">
<input type=button value="Close Window" onClick="CloseWin()">
  • 2
1 Solution
try adding
opener.location.href="new location";

to your closewin function.

adnan_from_hiitAuthor Commented:
let me try
adnan_from_hiitAuthor Commented:
Thanx it worked...............
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now