Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Unanswered: 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'; 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.

    Last edited by michaelfg81; 12-22-04 at 21:22.

  2. #2
    Join Date
    Aug 2004
    try this:
    <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
    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,

  3. #3
    Join Date
    Mar 2004
    thanx pal.
    it works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts