Transfer Data From Pop Up To Main Page

Please support our ASP advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Thread Solved
Reply

Join Date: Jul 2005
Posts: 185
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Transfer Data From Pop Up To Main Page

 
0
  #1
Apr 27th, 2007
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 ?
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: Transfer Data From Pop Up To Main Page

 
0
  #2
Apr 27th, 2007
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

  1. window.opener.document.getElementById("myInputText").value = document.getElementById("mySelectElement").value;
Last edited by hollystyles; Apr 27th, 2007 at 7:06 pm.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 185
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: Transfer Data From Pop Up To Main Page

 
0
  #3
Apr 28th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: Transfer Data From Pop Up To Main Page

 
0
  #4
May 1st, 2007
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.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 185
Reputation: aparnesh is an unknown quantity at this point 
Solved Threads: 10
aparnesh's Avatar
aparnesh aparnesh is offline Offline
Junior Poster

Re: Transfer Data From Pop Up To Main Page

 
0
  #5
May 3rd, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC