473,387 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Refreshing an IFrame inside an external browser window

258 100+
Hi everyone
I'v seen several websites doing what I'm asking now but I don't know how they do it.

Lets say we have an E-commerce website that has a shopping cart inside an IFrame which shows what products have been added.

Users should be able to add comments for each product inside the shopping cart (in the Iframe) .

When the user clicks on the product a new popup window opens which allows him to add the comment and then save.
But how can I refresh the IFrame after the user has saved the comment inside the external window?

I know there are other ways to do this.. Like refreshing the Iframe each X second but I don't think this is the logical way.

I need to do exactly what I described. refreshing an IFrame inside an external browser window.

Any suggestions will be highly appreciated

Thanks / Behzad
Nov 23 '09 #1
1 2932
bnashenas1984
258 100+
Hi again
Finally I found an answer to my question.
I post it here for others who might have the same problem.

This is possible to refresh the OPENER window using JavaScript.

Here is what I did :

Lets say we have a page with an IFrame in it

Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:window.open('popup.php','terms',' width=400, height=260, left=200, top=200');void('');">
  2. Open popup window
  3. </a>
  4.  
  5. <iframe name = 'frame1' src="iframe_inside.php" width="500" height="500">
  6. </iframe>
  7.  
We can refer to the first page as (Opener)

popup.php
Expand|Select|Wrap|Line Numbers
  1. <input type='button' value='refresh Iframe' onclick="window.opener.frames['frame1'].location.reload(true);">
  2.  
  3. <input type='button' value='close window' onclick="window.close();">
  4.  
Hope it helps
Nov 23 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: coolsti | last post by:
I need some help here. I am making an application which allows a user to look at a series of picture files one at a time, and enter the outcome of various visual tests to a database. The...
4
by: Venkatesh | last post by:
Hello All, I have an iframe in my main html and within iframe, I'm loading another HTML webpage. In my main html page, I've captured the mouse click event, by setting the "onclick" for <bodyof...
1
by: asamchristopher | last post by:
hi.. i am having a iframe inside a page. In iframe , i have some options, by according to the selection an option, i want to refresh the entire parent window .. say for eg: i am having some...
7
by: nicknack | last post by:
Hi. I have a strange problem wuth IFRAME. I have page aaa.aspx with an IFRAME that contain page bbb.aspx. page bbb.aspx sometimes redirect him self to page ccc.aspx. The problem is that...
6
by: bnashenas1984 | last post by:
Here you can see the script I found in google to refresh a page without hearing any click sound which is usual to hear when a link is clicked or a page is refreshed. <script...
6
by: deknoopjes | last post by:
I want to display a specific area of an external website using iFrames. A year ago I created such code successfully, but lost this code due to a crashed computer. Googling for any solutions did not...
0
by: Bali | last post by:
Default.aspx is the starting page containing a control(ascx) which has asp:button control on it. On the button click event it has to open a new page as a modal control. Since refreshing a page in...
1
by: Bali | last post by:
Default.aspx is the starting page containing a control(ascx) which has asp:button control on it. On the button click event it has to open a new page as a modal control. Since refreshing a page in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.