refreshing main opener window from a second (popup) window

Discussion in 'Javascript' started by sentinel, Feb 14, 2004.

  1. sentinel

    sentinel Guest

    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.
     
    sentinel, Feb 14, 2004
    #1
    1. Advertisements

  2. sentinel

    kaeli Guest

    In article <>,
    9.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
     
    kaeli, Feb 16, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Konrad R.
    Replies:
    2
    Views:
    1,231
    Konrad R.
    Aug 7, 2003
  2. =?Utf-8?B?Sko=?=
    Replies:
    1
    Views:
    2,469
    =?Utf-8?B?dmluYXk=?=
    Oct 12, 2004
  3. Matt Jensen
    Replies:
    1
    Views:
    5,493
    Matt Jensen
    Dec 16, 2005
  4. Urs Gubler
    Replies:
    0
    Views:
    315
    Urs Gubler
    Jul 2, 2003
  5. Tony Farrell
    Replies:
    1
    Views:
    313
    Randy Webb
    May 10, 2004
  6. Jens Peter Hansen
    Replies:
    7
    Views:
    877
    Randy Webb
    Jun 19, 2004
  7. JPL Verhey
    Replies:
    4
    Views:
    302
    JPL Verhey
    Feb 14, 2005
  8. window.opener, form.opener?

    , Jul 14, 2006, in forum: Javascript
    Replies:
    5
    Views:
    514
Loading...