SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Threaded View

  1. #1
    monitormensch oerdec's Avatar
    Join Date
    Sep 2004
    Location
    Hamburg
    Posts
    706
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    passing POST data from popup to main window

    Hello,

    I want a popup window with a form in it. When a button is pressed the window should close and all form data has to be passed to the main window. In that window there is no form. I just need the POST data as I had sent it directly to it.

    It would be great if anyone could help me.

    oerdec

    [edit]

    OK, I know how to pass data into a form field of the parent window...

    HTML in my popup:
    HTML Code:
    <input type="button" value="pass" onclick="pass('hallo')" />
    JavaScript function in popup
    Code:
    function pass(text) { 
      window.opener.document.getElementById('target').value = text;
      window.close();
    }
    HTML in main window:
    HTML Code:
    <input type="text" id="target" />

    But what can I do if there is no form in the main window? I need the POST data for further processing with PHP.
    Last edited by oerdec; Feb 2, 2007 at 14:32.


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
  •