473,233 Members | 1,589 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,233 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 2926
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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.