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 in the parent windowCode:<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;" />
The error i get when debugging isCode:<form method="post" name="article"> <input type="text" name="article[test]" /> </form>
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.Error: opener.document.forms.article.article has no properties
Thanks


Reply With Quote
