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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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]. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.