Solved

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

Posted on 2004-09-27
3
185 Views
Last Modified: 2008-03-10
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"
        window.close();
     }

</script>

<form name="prodInfo">
<input type=button value="Close Window" onClick="CloseWin()">
</form>
0
Comment
Question by:adnan_from_hiit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 20 total points
ID: 12159173
try adding
opener.location.href="new location";

to your closewin function.

-r-
0
 

Author Comment

by:adnan_from_hiit
ID: 12159183
let me try
0
 

Author Comment

by:adnan_from_hiit
ID: 12159198
Thanx it worked...............
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question