Results 1 to 4 of 4

Thread: [JavaScript] Send Data back to opener[RESOLVED]

Threaded View

  1. #1

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Resolved [JavaScript] Send Data back to opener[RESOLVED]

    Hey I am trying to send some data from a window i opened into a textbox that is on the main window.

    the code in the new window
    Code:
       <script language="javascript">
       function refresh_media(selected_media)
       {
      	opener.document.forms['article'].article['test'].value += "[media=" + selected_media + "]";
      } </script>
     <input type="button" class="button" value="Insert Selected Media" onClick="refresh_media(this.form.media_list.options[this.form.media_list.selectedIndex].value);return false;" />
    code in the parent window
    Code:
       <form method="post" name="article">
       <input type="text"  name="article[test]" />
       </form>
    The error i get when debugging is
    Error: opener.document.forms.article.article has no properties
    If i change the name of the textbox from "article[test]" to just "test" then it works, but i want the form items like an array so that i can easly process the data via PHP.

    Thanks
    Last edited by john tindell; Feb 7th, 2005 at 03:24 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width