If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Passing a value from a pop up page

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-22-04, 18:47
michaelfg81 michaelfg81 is offline
Registered User
 
Join Date: Mar 2004
Posts: 202
Passing a value from a pop up page

Hi there,

I got this one page which has textbox A and a link.When i click this link, it will come out with a pop up window which will retrive some data which i can choose from after some transaction.Once a user choose the data in the pop up window, that particular data will be send to the main page into textbox A.
How do i do that?Can i do that?
Where to look for the sample code?

i got this code which i put in the pop up window to link back

<a href="#" onClick="opener.frmTop.test.value='test';window.cl ose();">Choose</a>

This code cant work coz in the pop window, i made some process which uses form to submit the action.

So basically the "opener" is referring to the same pop up window.
How can i send the data "test" to the main page.
Please help.

Thanx

Last edited by michaelfg81; 12-22-04 at 21:22.
Reply With Quote
  #2 (permalink)  
Old 12-23-04, 10:20
oliflorence oliflorence is offline
Registered User
 
Join Date: Aug 2004
Posts: 96
Hi,
try this:
Code:
<script language="JavaScript" type="text/JavaScript">

function transmit() {
opener.window.document.form1.image_name.value = "My image name";
//the following line will call a script on your main page
opener.window.previewImage();
window.close();
}


</script>
Within your page:
<p><a href="javascript:transmit()">Click here to close the window and send the new value for the form field</a> </p>


You will have to change the fields name etc.
Hope this helps,
Olivier
Reply With Quote
  #3 (permalink)  
Old 12-27-04, 19:18
michaelfg81 michaelfg81 is offline
Registered User
 
Join Date: Mar 2004
Posts: 202
thanx pal.
it works
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On