vampke Posted March 24, 2008 Share Posted March 24, 2008 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 More sharing options...
rhodesa Posted March 24, 2008 Share Posted March 24, 2008 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'; Link to comment https://forums.phpfreaks.com/topic/97633-getting-popup-variable-in-textarea/#findComment-499545 Share on other sites More sharing options...
slushpuppie Posted March 24, 2008 Share Posted March 24, 2008 javascript Link to comment https://forums.phpfreaks.com/topic/97633-getting-popup-variable-in-textarea/#findComment-499548 Share on other sites More sharing options...
vampke Posted March 24, 2008 Author Share Posted March 24, 2008 thank you, I'll look into it! Link to comment https://forums.phpfreaks.com/topic/97633-getting-popup-variable-in-textarea/#findComment-499551 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.