Forum Moderators: open

Message Too Old, No Replies

Access form text element from popup window

I need to grab form element from a popup window generated by the form.

         

nAzGiRl2005

11:50 pm on Aug 25, 2005 (gmt 0)

10+ Year Member



I've written two simple html pages. One is a main form with a textarea, and the other one is a popup window. When a button in the main form is clicked, the popup window pops up. This window is used to edit the text value from the form.
I need to find a way to display the form value in the popup page when it pops up, which needs to be done via javascript code.
how do I go about this?
Please help me out!

ChadSEO

3:35 pm on Aug 26, 2005 (gmt 0)

10+ Year Member



nAzGiRl2005,

Welcome to WebmasterWorld!

You should be able to use something like this to reference the form value:

window.opener.document.forms[0].myArea.value;

The window.opener refers to the window that opened the current one. From there, you can access the document element, and from there, anything else exactly like you would as if it were on the current page. Hopefully this gets you closer to where you need to go.

Chad

nAzGiRl2005

4:57 pm on Aug 26, 2005 (gmt 0)

10+ Year Member



hello Chad,
thank you so much for your reply, I appreciate your help.
I've got another question for you.
so, is there a way to refer to the popup text element from the main form? I think that's what I need to do, since I need to see the form text value in the popup when it opens. So I need to access the popup element from the main form, for that purpose.
Please advice.