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()">
Who is Participating?
RoonaanConnect With a Mentor Commented:
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.

All Courses

From novice to tech pro — start learning today.