Destramic Posted January 7, 2007 Share Posted January 7, 2007 i have button that opens a new window...in that window is a form...when submitted i want the open window to close...but im wondering how do i get the values from that open window of a input field into my webpage?i know this can be done...thanks ricky Link to comment https://forums.phpfreaks.com/topic/33229-window-values/ Share on other sites More sharing options...
fenway Posted January 7, 2007 Share Posted January 7, 2007 Sound like you need a callback function back to window.opener. Link to comment https://forums.phpfreaks.com/topic/33229-window-values/#findComment-155243 Share on other sites More sharing options...
weknowtheworld Posted January 8, 2007 Share Posted January 8, 2007 I think you use onClick='window.close()' on submit of form. Link to comment https://forums.phpfreaks.com/topic/33229-window-values/#findComment-155916 Share on other sites More sharing options...
Destramic Posted January 8, 2007 Author Share Posted January 8, 2007 yea i need to get a value from a form input field and use it in another window...can you help? Link to comment https://forums.phpfreaks.com/topic/33229-window-values/#findComment-156050 Share on other sites More sharing options...
fenway Posted January 8, 2007 Share Posted January 8, 2007 Take a look [url=http://"http://www.webreference.com/js/column90/"]here[/url]. Link to comment https://forums.phpfreaks.com/topic/33229-window-values/#findComment-156106 Share on other sites More sharing options...
sloshire1 Posted January 8, 2007 Share Posted January 8, 2007 I have had some luck using the window.opener reference. You can have hidden fields on your main page and populate them from the popup like this:[code]parentField = window.opener.document.forms['myForm'].elements['myField'];popupField = document.forms['popupForm'].elements['myField'];parentField.value = popupField.value;window.close();[/code]Hope this helps. Link to comment https://forums.phpfreaks.com/topic/33229-window-values/#findComment-156122 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.