Code One
11-18-2003, 05:29 AM
basically in short...I would like to submit text from a child window textarea, to two parent window textareas. This should be a good lesson for me. Hope some on can help.
Code One
Code One
|
Click to See Complete Forum and Search --> : Post text from child to parent window Code One 11-18-2003, 05:29 AM basically in short...I would like to submit text from a child window textarea, to two parent window textareas. This should be a good lesson for me. Hope some on can help. Code One requestcode 11-18-2003, 07:05 AM To reference form elements in the parent window you would use the term "opener" in your statements like this: opener.document.form_name.element_name.value=document.form_name.element_name.value The first part refers to the form element in the parent window or "opener" and the second part is the form element in the child window. Code One 11-18-2003, 05:11 PM Parent window: ---------------- <head> <script> function postit() { opener.document.alpha.beta.value } </script> </head> <body> <form name="alpha"> <textarea name="beta" cols=10 rows=10></textarea> <input type="submit" onclick="" value="post"> </form> <form name="capa"> <textarea name="delta" cols=10 rows=10></textarea> <input type="submit" onclick="" value="post"> </form> </body> -------------------------------------------------------- Child window: -------------- <head> <script> function postem(){ document.form_name.element_name.value } </script> </head> <body> <textarea cols=20 rows=20 name=""></textarea> <input type="submit" name="" value="post"> </body> ======================================== Ok so I took your code, and placed it a bit like it would be on my page, now I need to post the text which is typed in the textarea of the popup, and onsubmit, transfer the data from the popup textarea to the parent textareas, there are two in total. I have no idea how to name the script to focus on two textarea at once, or even how to set up a script that will save a string of text or how ever it would happen in this case, and post it in the parent textareas. So if anyone could provide me with a more indepth answer, I would really appreciate it. Thanks Code One webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |