Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pop up window and parent window

    If I have a pop up window that has a form and I have to upload an image, I am going to have to send that form to a php page to upload the photo. Once the page has been submitted, can I still send variables back to the parent page?

    The popup will be windowA.php and will submit to pageB.php and pageB.php needs to send variables to parent.php.

    Is this doable?

  • #2
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    I believe that a child window can alter the contents of a parent window, but I don't know how this is done (I am something of a javascript noob myself!).

    As regards the PHP side of things, remeber that PHP is server-side and Javascript is client-side - therefore javascript on a web page can only alter the HTML for that web page and not the PHP that was used to generate it. By all means, you can have the child window call back to a PHP page on the server which then alters the behaviour of PHP which generates the parent window for all subsequent client requests for that page.

    I may be telling you something which is obvious to you already, but your post seemed a little unclear.

    Mike.
    Die Welt ist ein Irrenhaus und hier ist die Zentrale!

  • #3
    New Coder
    Join Date
    Dec 2006
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am going to have users click a link on parent.php and there will be a form on page popup.php. Normally onClick I would have javascript send info back to the parent page, but since I am uploading a photo, I have to use php (Unless you can do it with javascript). So the form from popup.php will be submitted to pageb.php.

    Once the page has been submitted, can pageb.php call a function on parent.php?

  • #4
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    Yes, you can do that it would seem; I;ve just done a google search as follows: http://www.google.co.uk/search?clien...=Google+Search
    Die Welt ist ein Irrenhaus und hier ist die Zentrale!

  • #5
    New Coder
    Join Date
    Dec 2006
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    mlse, I know how to pass from the child that was originally popped up to the parent. Once I submit the form and a NEW page (pageB) opens in the child window, this is when I need to send a function back to the parent window.

    Do I need some sort of button to do it or can it do it by itself?

  • #6
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    Ok I see what you mean now.
    I dunno

    I can think of a number of flaky hacks to get round it if it isn't possible! (e.g. calling a time-delayed function in the parent page before the form is submitted).
    Last edited by mlse; 12-08-2006 at 03:08 PM.
    Die Welt ist ein Irrenhaus und hier ist die Zentrale!


  •  

    Posting Permissions

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