SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I pass variable from called window to caller window?

    Hello,
    Here is a situation.
    In page1.php there are 3 text boxes and if one of them is entered and ok button is pressed, it should bring another window(managerPassword.php) and ask a manager password.
    If right manager password is entered in the window(managerPassword.php), it will close and the page1.php should proceed the next steps.

    I managed to succeed to open another window(managerPassword.php) from the first page(page1.php) and check the right manager password and close the window, but even this window is closed, the calling page(page1.php) doesn't know about anything happened in the managerPassword.php

    So how can I make that happen so if the right manager password is entered at the managerPassword.php then it will close and page1.php knows that the right password is entered somehow and proceeds the next steps?

    Thanks for your advice.

  2. #2
    SitePoint Evangelist borna's Avatar
    Join Date
    Jun 2006
    Location
    Iran, Tehran
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    close the window, you miss the password. huh!

    After window.close() you may not be able to pass vaiable if I recall truely.

    I think you may be benefited from puting the [authenticated] password in a session vaiable before your close statement.
    Last edited by borna; Sep 1, 2006 at 04:06.
    -1/2=999?

  3. #3
    SitePoint Aficionado JVLB's Avatar
    Join Date
    Jan 2002
    Location
    N 44 56.537' W 123 3.683'
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could have a variable in the opener window manipulated by the child window. You would address it from the child window with: opener.variable_name


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
  •