Can I transfer some data, which the user enters into a pop up window, to the page which called the pop-up window ? The Main page is in a frame. When the user clicks a button on the main page, a pop-up opens showing some choices. After the user selects the choice from the pop-up, the pop up is closed automatically and the main page shows the user's choice.

Can this be done using ASP/Javascript ?

11 Years
Discussion Span
Last Post by moji013

Yes, say you had a drop down list in the pop up window and a text box in the main page (that's in a frame but it works for me) using this javascript

window.opener.document.getElementById("myInputText").value = document.getElementById("mySelectElement").value;

Thank You very much, hollystyles !! Is there a way I can tranfer a collection of data, say all selected values from a multi select ?



Yes using the same technique. But I can't give code because it depends how you are generating the checkboxes. You will need to post your code for me to see first.


Thanks hollystyles, I managed to solve it. I wrote a small function in the main page, which accepted a data and added it to a select in the main page. I called this function from a loop from the pop-up window. It works fine for my purpose.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.