473,385 Members | 1,326 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,385 software developers and data experts.

refreshing main opener window from a second (popup) window

Hello,

I'm having problems refreshing a main window, and am not sure really
whether the solution will be Javascript or PHP related.

Firstly, I have a main file that calls a pop-up box which enables
comments to be made about certain images on the page. The pop-up makes
a connection to a MySQL database and the existing comments are put
into a PHP array and echoed to the screen.

I use a GET argument to send the image ID to the pop-up. If a name
instead a number is passed, it creates a new entry in the DB under
this name.

However, the main problem is that if the pop-up is closed down, unless
the main page is refreshed, it will still show '0' comments, and if
clicked again will pass the same GET arguments,, thus created another
entry with the same name.

What I need is to find a way of refreshing the main window when data
is posted from the pop-up window, so that the main page is always
showing accurate data.

Any suggestions ? I have tried things like 'window.opener.reload()'
but can't seem to get this to work.

Rgds
Neil.
Jul 20 '05 #1
1 2141
In article <f1*************************@posting.google.com> ,
ne**@sentinel.f9.co.uk enlightened us with...

What I need is to find a way of refreshing the main window when data
is posted from the pop-up window, so that the main page is always
showing accurate data.

Any suggestions ? I have tried things like 'window.opener.reload()'
but can't seem to get this to work.


Try
window.opener.reload(true);

If that doesn't work, tell us what *does* happen - that is, do you get
an error? If so, what does it say?
Does the page refresh, but show old data? If the page refreshes but
shows old data, it may be a setting in your browser or there may be a
proxy server between you and the content server that is caching. You can
set headers to (try to) tell it not to do that.

--
--
~kaeli~
Support your local medical examiner: die strangely!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris | last post by:
Hi, I'm really begginer in javascript. I created a form in a pop-up opened with javascript. how to recover variables of the form in the main page. Thanks for your help Chris.
1
by: Evan | last post by:
Let me just start by saying... and I truly do mean this... I HATE frames. Now that I have that out of my system, unfortnualty I do not have a choice and am forced to use the complex structure that...
1
by: David Lee | last post by:
I have a website which has one main window. When a user clicks an option on this window, a pop window appear. Then user can then enter information on this window and then they can click Ok. On...
5
by: Hemanth | last post by:
Hello there, I'm running a script that opens a popup window (which is basically a form with checkboxes and a submit button). When I click the submit button I want to run a PHP script and target...
2
by: Konrad R. | last post by:
Hi all i have 3 popup windows, in which i can add, edit and delete records from a table, now after user is done, i want to refresh main window, i am using...
1
by: VMI | last post by:
How can I transfer some text from a Textbox in a popup window to the main webform that opened that popup? The popup webform will have some type of Button that the user will click in order to...
1
by: inbamca | last post by:
Hi, Functionality is like when pressing 'CTRL+click' on drop down list in the main jsp page, a popup window appears with a list box contains all the values of the drop down clicked on the main page....
4
by: Buddha | last post by:
Hello, I posted this on two forums, without too much help .. and I am kinda stuck in this. I need to refresh the parent page from the second child window which is opened by the first child and...
1
by: bnashenas1984 | last post by:
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?

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.