SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2001
    Location
    Coventry, England
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Copy text from one window to another

    Hi,
    I need to be able to copy text from one window's form to another windows form that is already open. I have a popup box which allows you to select something which I then want to alter something on the main form in the main window. What I need to know basically is how to refer to a window by name and from there drill down to the name of the form element.

    Any help much appreciated
    Thanks
    Ian

  2. #2
    SitePoint Enthusiast RogueJedi's Avatar
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the window.opener property to get the parent window's handle, then call the form:
    Code:
    window.opener.document.form.<element>.value = "";
    Rob Nolan
    Do or do not, there is no try.


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
  •