We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,376 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Transfer Data From Pop Up To Main Page

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 ?

3
Contributors
5
Replies
5 Years
Discussion Span
9 Months Ago
Last Updated
7
Views
Question
Answered
aparnesh
Junior Poster
199 posts since Jul 2005
Reputation Points: 20
Solved Threads: 10
Skill Endorsements: 0

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;
hollystyles
Veteran Poster
1,188 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
Skill Endorsements: 0

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

regards

aparnesh
Junior Poster
199 posts since Jul 2005
Reputation Points: 20
Solved Threads: 10
Skill Endorsements: 0

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.

hollystyles
Veteran Poster
1,188 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
Skill Endorsements: 0
Question Answered as of 6 Years Ago by hollystyles

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.

aparnesh
Junior Poster
199 posts since Jul 2005
Reputation Points: 20
Solved Threads: 10
Skill Endorsements: 0

hi can you put complete code ?

moji013
Newbie Poster
1 post since Aug 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0708 seconds using 2.69MB