Maxraid Posted December 2, 2006 Share Posted December 2, 2006 I have a page with a link thats opens a popup window, in this the user will upload a image, using php script.question:I want a button in the popup, when you click, the popup will close and send the variable(which contains the name of the image)to the main page from where I opened the popup window? Link to comment https://forums.phpfreaks.com/topic/29212-send-a-variable-from-a-popup-to-a-main-window/ Share on other sites More sharing options...
artacus Posted December 2, 2006 Share Posted December 2, 2006 You probably want to fill in a form value. Whatever the case, you reference the original window as document.opener.In the popup:[code]document.opener.getElementById('thing').value = 'whatever';[/code] Link to comment https://forums.phpfreaks.com/topic/29212-send-a-variable-from-a-popup-to-a-main-window/#findComment-134125 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.