Jump to content

getting popup variable in textarea


vampke

Recommended Posts

Hello people,

 

I've been adapting an existing script to my needs, but I'm stuck now.

On a page with a text-area it is possible to click on a button to get a popup window. After putting information in this windows, the window will return a result in a textarea in the popup.

Now I need to get this result automatically in the textarea on the original page, so not on the popup page.

 

I'm not sure how to handle this.

 

Is this possible with php? Or should i be looking at javascript?

 

regards,

 

v.

Link to comment
https://forums.phpfreaks.com/topic/97633-getting-popup-variable-in-textarea/
Share on other sites

You want JavaScript. There is an object called window.opener, and if the textarea on the parent page was called 'updated_info' you would use something like this on the popup:

 

window.opener.document.forms[0].updated_info.value = 'This is the text to put in the textarea';

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.