SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot nicc9's Avatar
    Join Date
    Jan 2005
    Location
    New Orleans, LA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb exchange info between windows

    hi, all.

    i got a PHP script that I would like to run in a new window.

    i got 2 different approaches:

    1)

    i'd have a link in window A.
    user clicks on it, window B opens up.
    user fills up a form on window B
    window B closes
    info from the form is passed to window A
    info is processed
    window A reloads, user sees new info

    2)

    in alternative, i'd just need window A to refresh immediately after window B closes.
    i'd need like an event listener or something like that?

    is there a way to do this?

    i guess I should stick to the second approach as it's much simpler?

    any suggestion much appreciated.

    thanks a lot!!

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    window A reloads, user sees new info
    What new info? How about an example?

  3. #3
    SitePoint Zealot nicc9's Avatar
    Join Date
    Jan 2005
    Location
    New Orleans, LA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 7stud View Post
    What new info? How about an example?
    well, that isn't really the important part of my post

    maybe I haven't explained myself well.

    basically what I need is to make page A refresh using a script on page B, which is a new window created by clicking on a link on page A.

    any idea ?

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, that isn't really the important part of my post
    Actually, it's the most critical information to determine how to proceed. Make up an example, e.g. page A says Dog on it, and page B has one form field where if the user enters Cat and hits submit, then page B should subsequently close, and page A should display DogCat.

  5. #5
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    basically what I need is to make page A refresh using a script on page B, which is a new window created by clicking on a link on page A.
    Are you sure you need page B ?
    Maybe you just need better php script, which write filled info after submiting. Like this here http://www.michaelpark.net/contact.php (there is source at bottom)

  6. #6
    SitePoint Zealot nicc9's Avatar
    Join Date
    Jan 2005
    Location
    New Orleans, LA
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mirek Komárek View Post
    Are you sure you need page B ?

    i need it because page A has no room to add a form (which would be the content of page B.

    so I thought I'd do it in a new window to keep things clean (not too cluttered).

    any idea if there's a way to make page A refreash from page B?

    thanks!

  7. #7
    SitePoint Addict Mirek Komárek's Avatar
    Join Date
    Dec 2006
    Location
    Prague
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have here some old demo http://xy.wz.cz/spoluprace-oken/
    it will open popup onload and when you check checkboxes in that popup, they will be checked in opener on unload, or when you close that popup.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •